Customize the WordPress Dashboard

The WordPress admin dashboard is full of helpful features, but it can be overwhelming for new users or users with limited technical experience. The WordPress admin dashboard is full of helpful features, but it can be overwhelming for new users or users with limited technical experience. Many clients may want to be able to manage their content, but don’t want to worry about all of the additional settings and functionality that doesn’t apply to them. With a little extra work, you can simplify the WordPress dashboard and make it easier for your clients to log in and find what they are looking for. This could include creating custom user roles that determine what each user can access, limiting what options they see in the menu, renaming or reorganizing options, or creating a custom Welcome page that gives them quick-links to the most importants areas, step-by-step instructions or access to their web and social analytics.

Creating User Roles

The first step in creating a custom user experience is creating custom user roles that give you more control over what each user can see. While the roles that come with WordPress by default are great, in many cases, you gain a lot more flexibility by creating your own. We recommend the Members plugin by Justin Tadlock to handle this because it is simple, but gives you a lot of control over each role. In addition to creating new, custom roles, you have the ability to pick and choose what capabilities each role has and even create new capabilities you can use in custom scripts.

We recommend the Members plugin by Justin Tadlock to handle this because it is simple, but gives you a lot of control over each role.

Configuring each role will give you quite a bit of control over what each user will see when they log in right out of the box, and you will be able to build on this as you create custom functionality for your client.

Customize the Admin Menu

The capabilities assigned to each role will generally control what is visible in the primary admin menu, but there are times when this isn’t perfect. For example, giving clients the edit_posts capability will let them manage posts as well as many custom post types, but they may not need to see all of those options. In some cases, you may want to hide basic features such as Tools or the Profile option to streamline their experience. The remove_menu_page function can help you pull out some of the options you don’t need, and you only need to add a little bit of code to your functions.php file.

add_action( 'admin_menu', 'my_remove_menu_pages', 9999);
function my_remove_menu_pages() {
	global $current_user;

	if( ( in_array('client', $current_user->roles) ) && !in_array('administrator', $current_user->roles) && !in_array('editor', $current_user->roles) ) {
	    remove_menu_page( 'edit-comments.php' ); // hide comments
	    remove_menu_page( 'tools.php' ); // hide tools 
	    remove_menu_page( 'upload.php' ); //  hide media library
	    remove_menu_page( 'profile.php' ); // hide profile link 
            remove_menu_page( 'edit.php?post_type=shop_order' ); // hide orders
	}
}

Create a Custom Welcome Page

When a user first logs in to the backend of WordPress, they typically see a standard page that includes some basic information about their site and meta boxes that relate to plugins they are using. While this can be a nice overview, there are many times when it is more helpful to provide information that relates directly to your clients rather than the generic information they will see by default. You can use the remove_meta_box function to hide some of the irrelevant boxes your clients don’t need, or you create a completely custom Welcome page that gives you more control over what clients see when they first log in. To accomplish this, you use the add_menu_page function to create your page, and wp_redirect to redirect users to the new page.

<?php
function dashboard_redirect(){
    wp_redirect(admin_url('admin.php?page=welcome-screen-about'));
}
add_action('load-index.php','dashboard_redirect');

function login_redirect( $redirect_to, $request, $user ){
    return admin_url('admin.php?page=welcome-screen-about');
}
add_filter('login_redirect','login_redirect',10,3);

add_action('admin_menu', 'welcome_screen_pages');
function welcome_screen_pages() {
  add_menu_page(
       'Welcome',
       'Welcome',
        'read',
        'welcome-screen-about',
        'welcome_screen_content',
        'dashicons-admin-home',
        1
    );
}

function welcome_screen_content() {
  ?>
  <div class="wrap welcome">
    <h2>Welcome!</h2>
    <p>This is a preview of what the admin dashboard for your new website might look like. While a live website will have more options, we wanted to give you a sneak peek of how easy adding and managing content is with WordPress. We also wanted to give you a preview of some of the improved functionality we have in mind for your new website.</p>

    <h3>Custom Website Features</h3>
    <div class="features">
      <div class="featured-box">
    		<div class="icon-button"><div class="inner"><i class="fa fa-file-text fa-5x"></i></div></div>
    		<h4>Documents</h4>
    		<p>The online document center makes it easy for you to manage and add online forms and documents. City residents and visitors will be able to search files by category, keyword, or file type. </p>
      </div>
      <div class="featured-box">
    		<div class="icon-button"><div class="inner"><i class="fa fa-briefcase fa-5x"></i></div></div>
    		<h4>Careers</h4>
    		<p>Post job openings online in a format that is easy for visitors to browse and search. All openings are automatically connected to a custom online application, and all submitted applications are stored online for you to refer to later.</p>
      </div>
      <div class="clear">&nbsp;</div>
    </div>
  </div>

  <script src="https://use.fontawesome.com/f2634687ff.js"></script>
  <?php
}

Integrate Real-Time Analytics

There are many plugins that let you integrate analytics directly into your WordPress dashboard, but the data can be difficult to interpret for clients that aren’t used to analyzing it. We’ve found it is helpful to provide a quick overview of this information. Google has an extensive API that makes it easy to pull in data and display it in an easy-to-understand format. Getting this in place requires some higher level programming, but if you have a web developer that is familiar with languages like PHP and Javascript, the process should be fairly simple.

Google has an extensive API that makes it easy to pull in data and display it in a straight-forward, easy-to-understand format. 

You can take this a step further and put together real-time reports for social media channels as well. Though this process isn’t quite as straight-forward, you can use services like Facebook’s Graph API or Twitter’s Analytics API to create interactive reports. Again, this process will require a developer with programming knowledge to implement.

You can take this a step further and put together real-time reports for social media channels as well.

Looking for help with a WordPress website?

Do you need help managing your existing website or are you looking to build a new one? Lee Media Group can help! Contact us today to find out how we can help with your project.

Tabytha Rourke

About Tabytha

Tabytha leads our team in programming and database functionality and specializes in creating custom web apps, writing secure code, and handling sensitive data. Read More About Tabytha.

Leave a Reply