removing the standard dashboard widgets in WP so I Can replace with custom
Question
The following code has removed some but not all of the widgets from the WP dashboard. I am adding it to my functions file inside my theme. My question is two fold:
1.) What about this is throwing the Use of “undefined constant” errors for remove_dashboard_meta, admin_init and manage_options.
function remove_dashboard_meta() {
remove_meta_box( ‘dashboard_incoming_links’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_plugins’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_primary’, ‘dashboard’, ‘side’ );
remove_meta_box( ‘dashboard_secondary’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_quick_press’, ‘dashboard’, ‘side’ );
remove_meta_box( ‘dashboard_recent_drafts’, ‘dashboard’, ‘side’ );
remove_meta_box( ‘dashboard_recent_comments’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ );
remove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’);//since 3.8
}
add_action( ‘admin_init’, ‘remove_dashboard_meta’ );
The second question is that the Elementor overview and WPdeveloper feed are still there. What code is going to remove those? This is WP 5.5
0
functions, php
3 years
2020-08-21T21:10:52-05:00
2020-08-21T21:10:52-05:00 0 Answers
41 views
0
Leave an answer