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, a Jaipur-based IT and GenAI development company he has led since 2009. Eoxys has delivered 700+ projects, building custom AI agents, chatbots, mobile apps and web platforms for businesses worldwide. Shiv writes about practical AI app development and what it takes to ship software that works.

Latest Posts

Isometric illustration of a business hiring a remote AI development team in India, with a laptop showing an AI chip linked across a globe to developer workstations

Hire AI Developers in India: Models, Vetting and Red Flags

If you plan to hire AI developers in India, the hard part is not finding people. It is telling a…

Shiv Kumawat
October 11, 2026
DPDP compliance for AI apps: isometric shield protecting a phone and cloud server, with consent toggle, padlock and data cubes on a navy background

DPDP Compliance for AI Apps: What to Fix Before May 2027

If your app or AI chatbot handles personal data of people in India, DPDP compliance for AI apps is now…

Shiv Kumawat
October 10, 2026
GPT-6.1 Sol vs Claude Sonnet 5.5: isometric illustration of two AI model cubes connected by a data stream on a navy background

GPT-6.1 Sol vs Claude Sonnet 5.5: Which Model for Your App?

GPT-6.1 Sol vs Claude Sonnet 5.5 is the mid-tier choice most founders are making right now. Both models launched in…

Shiv Kumawat
October 9, 2026
,

Leave a Reply

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