Skip to content

Instantly share code, notes, and snippets.

@habibmac
Created June 6, 2012 16:38
Show Gist options
  • Save habibmac/2883133 to your computer and use it in GitHub Desktop.
Save habibmac/2883133 to your computer and use it in GitHub Desktop.
WP: Customize the Dashboard
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
// Remove these dashboard widgets...
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
// Add a custom widget called 'Help and Support'
wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'custom_dashboard_help');
}
// This is the content for your custom widget
function custom_dashboard_help() {
echo '<p>Lorum ipsum delor sit amet et nunc</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment