Wordpress Dashboard

I was looking for a great way to build into the WordPress CMS (content management system), a reminder for my clients that support is always available. So by a few lines of code, we are able to create a custom dashboard widget inside the WordPress CMS, this simple code trick simply drops our logo and a link to our contact page as a widget on the wordpress dashboard.

To add one of these to your site….

Simply open your functions.php file and add the following code:

 add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
 
    function my_custom_dashboard_widgets() {
    global $wp_meta_boxes;
 
    wp_add_dashboard_widget('custom_help_widget', 'Mind Blossom Creations | Support', 'custom_dashboard_help');
    }
 
    function custom_dashboard_help() {
    echo '
 
If you have any questions or need assistance, please contact us through the contact form on our site.<a href="http://www.mindblossomcreations.com/contact.html">Click here to contact us</a>.
 
<img src="http://www.mindblossomcreations.com/blog/wp-content/uploads/2011/02/cms-mbc-logo.png" alt="" width="200px" /> ';
    }

Remember to change the links and logos, and also add other useful information.

This little code snippet might come in handy for your clients, or when you are simply looking to to create custom dashboard widgets for useful features you always wished you had on your dashboard.

This is how this code appears on the dashboard:
Wordpress Custom Dashboard Widget

You may be interested in:

Tags: , ,