... Skip to main content
FixesWebsite design

Add dashboard widget in WordPress

By 07/11/2019August 9th, 2022No Comments

Last Updated on 09/08/2022 by iwebsitez.com

This ability to add a custom dashboard widget in the WordPress dashboard is a really handy feature. You get the ability to add a custom dashboard widget with information that can help. In this article, we will show you how you can customise dashboard widgets in WordPress.

Simply add this code to your theme’s functions.php file, preferably your child theme:

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', 'Website Help', 'custom_dashboard_help');}function custom_dashboard_help() {echo '<p>Welcome to your website. Need help? Contact us at <a href="mailto:support@iwebsitez.com">support@iwebsitez.com</a>. For further info and help visit our website: <a href="https://iwebsitez.com">iwebsitez.com</a></p>';}

The resulting code

Here is what the code you placed in functions.php will look like in your WordPress dashboard. This is pretty cool if you want to alert your clients about something and don’t want to log in.

custom wordpress dashboard widget

Don’t forget to swap our details for yours. So there you have it, an easy way to add a custom widget in a WordPress dashboard, please check our other WordPress fixes and our WordPress maintenance page for care plans.

Need a price for a new website instantly

Try our website cost calculator for free and get a price emailed to you.

Leave a Reply