20 PHP Snippets for Making the WordPress Admin Easier for Clients
Sat Nov 25 2023 07:55:51 GMT+0000 (Coordinated Universal Time)
Saved by
@dmsearnbit
// Create the function to use in the action hook
function example_remove_dashboard_widgets() {
// Globalize the metaboxes array. This holds all the widgets for wp-admin
global $wp_meta_boxes;
// Remove the incoming links widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
// Remove right now
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
content_copyCOPY
https://speckyboy.com/20-snippets-and-hacks-to-make-wordpress-user-friendly-for-your-clients/
Comments