Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove activity feed from Wordpress admin

I am looking for a way to hide activity feed from the dashboard using a function. Does anyone know how to do this? I want to completely remove it. I want to achieve this without a plugin.

like image 822
Shae Avatar asked Feb 19 '26 14:02

Shae


2 Answers

You can use remove_meta_box() like;

function remove_dashboard_widgets(){
    remove_meta_box('dashboard_activity', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

add above code to functions.php

like image 161
Hüseyin BABAL Avatar answered Feb 22 '26 14:02

Hüseyin BABAL


Dashboard widgets and other meta boxes can also be removed by using the unset function. You might need to play around with the array keys, or use var_dump() to find the path for the widget you're looking for.

 // Removes dashboard activity widget.
  function remove_dashboard_activity_widget() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
  }

  // Triggers dashboard widgets removal.
  add_action('wp_dashboard_setup', 'remove_dashboard_activity_widget');

Additionally like Hüseyin BABAL mentioned, meta boxes can also be removed like this:

function remove_dashboard_widgets(){
    remove_meta_box('dashboard_activity', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
like image 35
csalmeida Avatar answered Feb 22 '26 14:02

csalmeida