How to Create Dashboard Widgets in WordPress

| Last Updated: | In: WordPress, WordPress Beginners, WordPress Snippets


In this tutorial i will let you know very interesting things with you, which will help you to create custom dashboard widgets in wordpress. If you want to display some information related to your website on your dashboard so that you don’t need to go in other menu option.

If you create a custom wordpress widgets and display that information on that. There are two ways to do this first is you can simply edit your functions.php file and add below snippets at the end of the file.

Create Custom Dashboard widgets Plugin

If don’t want to add above code in your functions.php file, you can create a custom plugin for that. Lets start to create custom plugin. Go to the wp-contents => Plugins and create a folder named “custom-dashboard-widgets”. create index.php file and add the header information to describe plugin.

Add a valid PHP code with below header comment look like this:

After the above code add below code, below code will create a custom widget with sample messages.

After creating plugin login to your website’s admin panel and activate plugin via Plugins menu. Now navigate to the dashboard there you will see the below outputs.


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:


, , , , , , ,