Advertisement
rexcoder

Customizing the Dashboard

Jan 10th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. //Remove unwanted widgets from Dashboard
  2. function remove_dashboard_widgets() {
  3.     global$wp_meta_boxes;
  4.     unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
  5.     unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
  6. }
  7. add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
  8.  
  9.  
  10.  
  11. //Add a new widget to the Dashboard
  12. function contact_help(){
  13.      echo 'If you have questions about working with the Roux Academy WordPress system, contact Kim Neue at kn@rouxacademy.com or 674-555-1212';
  14. }
  15. function register_widgets(){
  16.      wp_add_dashboard_widget( 'contact_help_widget', 'Need help?', 'contact_help');
  17. }
  18. add_action('wp_dashboard_setup', 'register_widgets' );
  19.  
  20.  
  21. //Change log-in image
  22. function custom_login_logo() {
  23.   echo '<style type="text/css">
  24.    h1 a { background-image:url('.get_bloginfo('stylesheet_directory').'/_images/ralogo_admin.png) !important; }
  25.    </style>';
  26. }
  27. add_action('login_head', 'custom_login_logo');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement