When you are developing a WordPress powered website for a client, the dashboard can be a little in your face with all the widgets, menu items and WordPress branding. So to make the dashboard more user friendly and customisable to a client needs, you can do a few things to clean it up.

Please note: the code below is one way to clean up the dashboard if you just want to add a block of code to your functions.php. I prefer to do this as a private plugin and I will provide more details on this soon (as soon as Uni stops kicking my ass and taking all my time!)
A Quick Heads Up: A shout out to Aaron Rutley (@AaronRutley) of Eleven Media and crew, they have a plugin that can help you get that customised dashboard with a few extra cool modifications they use, check it out – Minimal Admin

I will do a post on each in the future to show what each part does, but for now, please feel free to use and make your next client happy with a personalised WordPress dashboard. For your client or personal dashboard you may not need all the code so pick the parts you need, refer to the //Comments.

<br />
// Custom Dashboard widgets<br />
function custom_dashboard_widgets()  {<br />
  global $wp_meta_boxes;<br />
    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );<br />
    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );<br />
    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );<br />
    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );<br />
    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );<br />
    unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );<br />
    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );<br />
    unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );</p>
<p>  // Intro Widget<br />
  function custom_dashboard_intro() {<br />
    echo '&amp;lt;p&amp;gt;Give your client a personal welcome message&amp;lt;/p&amp;gt;';<br />
    echo '&amp;lt;p&amp;gt;Put in your contact info, eg, email, phone, skype etc.&amp;lt;/p&amp;gt;';<br />
<p>  // Media Widget<br />
  function custom_dashboard_media_info() {<br />
    echo '&amp;lt;p&amp;gt;Notes: Add details of image sizes here&amp;lt;/p&amp;gt;';<br />
<p>  // Add the custom widget areas<br />
  wp_add_dashboard_widget('custom_intro_widget', 'Theme Support Intro', 'custom_dashboard_intro');<br />
  wp_add_dashboard_widget('custom_media_widgets', 'Theme Media Support', 'custom_dashboard_media_info');<br />
}<br />
add_action('wp_dashboard_setup', 'custom_dashboard_widgets');</p>
<p>// Add Dashboard Logo<br />
function custom_admin_logo() {<br />
  echo '&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;#header-logo { background-image: url(' . get_bloginfo('template_directory') . '/images/logo_admin_dashboard.png) !important; }&amp;lt;/style&amp;gt;';<br />
}<br />
add_action('admin_head', 'custom_admin_logo');</p>
<p>// Change Dashboard Footer Attribution<br />
function remove_footer_admin() {<br />
 echo '&amp;lt;span id=&amp;quot;footer-thankyou&amp;quot;&amp;gt;Developed by &amp;lt;a href=&amp;quot;http://www.YOURWEBSITE.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;YOUR NAME&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;';<br />
}<br />
add_filter('admin_footer_text', 'remove_footer_admin');</p>
<p>// Remove Menu Items &amp;gt; Removes Tools and Users<br />
function remove_menus() {<br />
  global $menu;<br />
  $restricted = array(__('Tools'),__('Users'));<br />
  end ($menu);<br />
  while (prev($menu)){<br />
    $value = explode(' ',$menu[key($menu)][0]);<br />
    if(in_array($value[0] != NULL?$value[0]:&amp;quot;&amp;quot; , $restricted)){unset($menu[key($menu)]);}<br />
  }<br />
}<br />
add_action('admin_menu', 'remove_menus');</p>
<p>// Remove Sub Menu Items &amp;gt; menu-ID:s are found in wp-admin/menu.php<br />
function remove_submenus() {<br />
  global $submenu;<br />
    unset($submenu['themes.php'][5]); // Removes 'Themes'.<br />
}<br />
add_action('admin_menu', 'remove_submenus');</p>
<p>// Hide 'Screen Options' tab<br />
function remove_screen_options_tab() {<br />
  return false;<br />
}<br />
add_filter('screen_options_show_screen', 'remove_screen_options_tab');</p>
<p>// Hide Help tab<br />
function hide_help() {<br />
  echo '&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;#contextual-help-link-wrap { display: none !important; }&amp;lt;/style&amp;gt;';<br />
}<br />
add_action('admin_head', 'hide_help');</p>
<p>// Remove WordPress menu from WP logo<br />
function wplogomenu_admin_bar_remove() {<br />
  global $wp_admin_bar;<br />
  $wp_admin_bar-&amp;gt;remove_menu('wp-logo');<br />
}<br />
add_action('wp_before_admin_bar_render', 'wplogomenu_admin_bar_remove', 0);</p>
<p>// Change Welcome In Admin Bar<br />
function wp_user_admin_bar_menu( $wp_admin_bar ) {<br />
  $user_id = get_current_user_id();<br />
  $current_user = wp_get_current_user();<br />
  $profile_url = get_edit_profile_url( $user_id );</p>
<p>  if ( 0 != $user_id ) {<br />
    // Add the &amp;quot;My Account&amp;quot; menu<br />
    $avatar = get_avatar( $user_id, 28 );<br />
    $howdy = sprintf( __('Welcome back %1$s'), $current_user-&amp;gt;display_name );<br />
    $class = empty( $avatar ) ? '' : 'with-avatar';</p>
<p>    $wp_admin_bar-&amp;gt;add_menu( array(<br />
      'id' =&amp;gt; 'my-account',<br />
      'parent' =&amp;gt; 'top-secondary',<br />
      'title' =&amp;gt; $howdy . $avatar,<br />
      'href' =&amp;gt; $profile_url,<br />
      'meta' =&amp;gt; array(<br />
        'class' =&amp;gt; $class,<br />
        ),<br />
      ) );<br />
  }<br />
}<br />
add_action( 'admin_bar_menu', 'wp_user_admin_bar_menu', 11 );<br />

You can also view this on GitHub Gist – WP Minimize Dashboard

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.