Add Custom Dashboard Widgets in WordPress.

Code

How To Add New Custom Dashboard Widgets in WordPress?

There are many of new themes coming out for WordPress every day, but none of them seems to utilize this feature for providing useful information and links for client.
WordPress developers should add custom dashboard widget with support information when creating custom themes for clients.

these can be help information or may be support links of developer.

For adding Custom Dashboard Widgets in WordPress we will use one hook and one WordPress function.

  1. wp_dashboard_setup hook
  2. wp_add_dashboard_widget function

About “wp_add_dashboard_widget”


wp_add_dashboard_widget( string $widget_id, string $widget_name, callable $callback, callable $control_callback = null, array $callback_args = null )

Parameters

$widget_id
(string) (Required) Widget ID (used in the ‘id’ attribute for the widget).
$widget_name
(string) (Required) Title of the widget.
$callback
(callable) (Required) Function that fills the widget with the desired content. The function should echo its output.
$control_callback
(callable) (Optional) Function that outputs controls for the widget.
Default value: null
$callback_args
(array) (Optional) Data that should be set as the $args property of the widget array (which is the second parameter passed to your callback).

Documentation
You can add one by pasting the following code to your thems function.php

function CustomDashboardWidgets() {
  global $wp_meta_boxes; 
  wp_add_dashboard_widget('CustomHelpWidget','Custom Help Dashboard','CustomDashboardHelp');
} 
function CustomDashboardHelp() {
  echo 'My First Custom Dashboard Widgets';
}
add_action('wp_dashboard_setup','CustomDashboardWidgets'); 
null

Related reading:

Shiv Kumawat

Executive Director & CEO

Shiv Kumawat is the CEO of Eoxys IT Solution LLP, the Jaipur-based IT company he has led since 2009. An AI & IT Solutions Consultant with 16+ years of experience, he works with startups and enterprises to turn ideas into market-ready SaaS platforms, mobile apps and AI-driven solutions. His team has delivered 700+ projects across SaaS, mobile and web apps, automation and AI. He previously served as Chief Technology Officer for a US company.

Latest Posts

AI agent approach illustration: an AI agent on a platform connected to tools, email, browser and a completed task

Hire an AI Agent Developer: Skills, Cost and When You Need One

An AI agent is software that uses a language model to decide what to do next: look something up, call…

Shafeeq Khan
October 31, 2026
AI visibility audit illustration: a rising search visibility chart, an eye symbol and ranked podium blocks

AI Visibility Tools Compared: Prices, Engines and Limits

If you want to know whether ChatGPT, Gemini or Google’s AI Overviews mention your business, you have two choices: check…

Shafeeq Khan
October 30, 2026
RAG vs fine-tuning illustration: an AI model drawing on a knowledge base of documents on an isometric navy platform

Build an AI Chatbot With Your Own Data: RAG Explained for Business

Most teams that want to build an AI chatbot with your own data have the same problem: a general chatbot…

Shafeeq Khan
October 29, 2026
,

Leave a Reply

Your email address will not be published. Required fields are marked *