Remove 'Activity Box' from Dashboard via Themes Functions.php

Hi.

Hope you are all well?

I got this piece of code from "Stackoverflow", for removing the 'Activity Box' from the 'Dashboard':-

It reads :-

You'll either have to create a plugin or add a function to your theme functions.php file.

function remove_activity_dashboard_widget() {
remove_meta_box( 'dashboard_activity', 'dashboard', 'side' );
}

// Hook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'remove_activity_dashboard_widget' );

The URL is:- https://stackoverflow.com/questions/22228346/remove-activity-feed-from-wordpress-admin.

I placed it in my themes 'functions.php' and got a 'white screen'!!!

Can you help me with correcting me re: what I should have added/done, please?

Thanking you in advance.

Regards

johnv