Best way to remove widgets from the dashboard
-
I was using the below code to remove some/all widgets from the dashboard:
add_action('wp_dashboard_setup', 'wpdocs_remove_dashboard_widgets'); function wpdocs_remove_dashboard_widgets(){ remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); }
But I think this is not the best way? Because it actually remove the widgets after WordPress added them.
Is it possible to tell WordPress that don’t create/generate these widgets at first?
Thewp_dashboard_setup
hook fires after core widgets for the admin dashboard have been registered, is there a hook that fire before they are added, and how to stop them?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Best way to remove widgets from the dashboard’ is closed to new replies.