When it comes to customizing the WordPress dashboard, you basically have two options:
- Customize the widgets that appear on the WordPress dashboard by adding and removing them in the code.
- Completely replace the dashboard with your own custom dashboard.
The first option is a great option, but the issue here is that you have no way of removing widgets that may appear in the future due to new plugins being added or existing plugins being updated. So, if you or your client is picky, then you will probably want to completely replace the WordPress dashboard.
The code below has been tested in WordPress 3.5.1 and should be compatible as far back as WordPress 3.2. Comments are provided for your convenience as well as instructions on how to customize and use the plugin.
Note that I am checking for the read
capability, which will result in the custom dashboard loading for all users. If you just wanted to display the custom dashboard for subscribers, then just change the capability property to subscriber
. If you want to learn more about how you can customize which users will see the custom dashboard, reference the documentation for the current_user_can()
function.