Removing meta box from dashboard
-
The plugin adds the “WP Armour Anti Spam Statistics” meta box to the main admin dashboard. I generally like to keep the dashboard clean of anything my clients are not using, but my usual way of removing the standard meta boxes doesn’t seem to work with the plugin. I am specifically looking for a way to remove the entire meta box through code, so that each user doesn’t have to manually tick the checkboxes to manage their view.
In the plugin files, I found the following:
add_meta_box( 'wpa_dashboard_widget', 'WP Armour Anti Spam Statistics', 'wpa_dashboard_widget_function', 'dashboard', 'side', 'high');
Below is one remove_meta_box for a normal dashboard item (working), and the one I tried for the plugin based on the code above (not working).
function remove_dashboard_meta() { remove_meta_box( 'dashboard_activity', 'dashboard', 'normal'); remove_meta_box( 'wpa_dashboard_widget', 'dashboard', 'side'); } add_action( 'admin_init', 'remove_dashboard_meta' );
Help would be much appreciated, thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Removing meta box from dashboard’ is closed to new replies.