How to Create Custom Dashboard in WordPress?

If you are new to the world of blogging and you don’t have any past experience in developing web applications, then you probably have no idea how WordPress actually works. As you probably already know, WordPress is a platform that consists of hundreds of thousands lines of code which work as one to give you the best blogging platform available for free! However, did you know that by changing some of WordPress’ core files, you can modify many parts of your WordPress website in order to make it more unique & convenient for your needs and requirements.

In this post we’ll discuss the WordPress Administrator Dashboard – the place where all the magic happens! You use it to write content, adjust the settings of your plugins, modify your themes, get valuable website usage & performance statistics, etc. However, most people use the default administrator dashboard which to be honest is pretty plain & simple. If you want it to be a bit more sophisticated and to display exactly the information you need, then maybe it is time to learn how to create custom dashboard in WordPress. We’ll teach you how to create brand new widgets for your dashboard, as well as how to include or exclude widgets from the default menu.

Using “Screen Options” to Customize the Dashboard

If you have been using WordPress for a while, then you probably already know that the easiest way to change the administrator dashboard’s appearance is to use the helpful Screen Options panel found in the upper right corner of your screen. Open your administrator dashboard and click on the “Screen Options” menu.

Create Custom Dashboard in WordPress

As soon as you click on the button, the following menu will expand below:

Create Custom Dashboard in WordPress

Unfortunately, WordPress‘ developers have decided that we don’t need much freedom when it comes to customizing the administrator dashboard, so the options you’ll see are pretty limited. From this menu you can select or deselect widgets to be displayed, as well as choose the number of columns in which these widgets should be arranged. Many of the widgets that are enabled by default aren’t needed at all, so don’t hesitate to deselect the ones that you don’t need, this way you’ll get a clutter-free workspace that we’ll later fill with important information.

Customizing the Dashboard via Plugins

If you think that the default Screen Options enough isn’t giving you as much control as you want, then you might want to consider using a free or premium WordPress plugin that gives you the ability to customize the dashboard in WordPress. A fairly popular plugin that this serves this exact purpose is Clean WP Dashboard – a free WordPress plugin that gives you better control over the widgets you see or don’t see. However, keep in mind that disabling a widget will remove it for all users, not just you. Widgets disabled with this plugin won’t appear in the Screen Options panel either, so consult with your team before using it.

Edit the WordPress Dashboard by Using the functions.php File

Tempering with core WordPress files isn’t recommended for beginners, so be careful if you don’t have much experience with PHP. Even if you are an experienced developer it is mandatory to backup all files that you are about to change, so you won’t risk losing any information in case anything goes wrong. So the first thing we want you do is to backup your WordPress theme’s functions.php file. Now that this is done you can keep on reading.

Many users consider this method to be the best choice, because of several reasons:

  • There are absolutely no limits in terms of customization when using this technique
  • You don’t have to install any plugins that may reduce your website’s performance
  • This is a long-term solution that is reliable & safe

Thousands of people have already used this method, so you can find hundreds of examples of code snippets that are used to change the way the WordPress dashboard looks. Don’t hesitate to spend some time searching the web for such code snippets, because they can save you a lot of time. And if you want to do everything from scratch, then keep on reading to see how you can modify the Screen Options panel and the WordPress dashboard by inserting some code in the functions.php file of your template.

Creating a Custom Dashboard Widget

You can include just about anything in the dashboard by using this method. Here’s a simple example which will add a custom widget to the Screen Options panel:

As you can see, this code is incredibly simple, but keep in mind that it doesn’t do much – the first part contains the widget’s content while the second part basically shows the choice in the Screen Options panel. If you insert this piece of code to the functions.php file, this will be the result:

Create Custom Dashboard in WordPress

Creating a completely customized code to add widgets will take a lot of time, so we advise you to look into some big WordPress forums and see if users have published pre-made snippets of code that will add various widgets to the WordPress dashboard. It will take just minutes to find code for calendars, recent subscribers, post statistics, image statistics, etc.

Removing Default Widgets

If you like to completely revamp the WordPress dashboard, then you can use this code snippet to completely remove any trace of the default widgets that can be found in the Screen Options panel. Copy it to the bottom of your functions.php file:

A little bit more sophisticated method that does the same job is shown below. In this case, we’ll be using the WordPress API to get rid of the unwanted widget options.

Last, but not least, you can also disable widgets for specific user groups. If you want to show all available dashboard widgets to Administrators, but hide them from everyone else, then add the following lines of code to the bottom of your functions.php file:

Tempering with Plugin & Non-default Widgets

Until now we only discussed the default WordPress dashboard widgets. Now it is time to dig a little deeper and learn how to control widgets that have been added by plugins or other WordPress extras. In order to remove such widgets from the Screen Options panel you’ll need to find the exact name of the widget. The easiest way to do this is to take a look at the source code of the Dashboard and find the <div> tag associated with the widget you want to remove. Here’s the <div> tag associated with the custom widget we created a couple of minutes ago:

As you can probably already tell, the exact name of the widget is “custom_dashboard_widget”. So in order to remove this widget from Screen Options, we’ll have to take the code from the previous chapter and add the following line to it:

The result should be the following:

This simple method can be used with as many widgets as you want, so don’t hesitate to give it a try. However, if you work with too many 3rd-party plugins that include widgets in your dashboard, then it might be difficult finding all their names. Thankfully, there is a neat technique that you can use to see a list containing the names of all dashboard widgets available at the moment.

To do this you need to open the functions.php and add the code below to the bottom. When you save the changes, go to the Dashboard and you’ll see a list of all the widgets registered with WordPress.

Conclusion

As you can see, knowing a little bit about WordPress can help you change many things that will make your website more useful, convenient and flexible. Now you know how to quickly and easily modify the WordPress dashboard, and to customize it according to your needs. Don’t hesitate to leave a comment if you have any questions or need assistance setting up your custom WordPress dashboard.