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


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:-

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.