Created
June 6, 2012 16:38
-
-
Save habibmac/2883133 to your computer and use it in GitHub Desktop.
WP: Customize the Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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