An Introduction to the WordPress Dashboard Widgets API



Originally published at:

The WordPress Dashboard Widgets API lets themes and plugins add, remove or re-position WordPress dashboard widgets. The WordPress Dashboard is the first thing we see when we log in to the WordPress administration screen. The WordPress Dashboard Widget API has been available from WordPress 2.7 onwards.

In this tutorial we’ll look at the different actions and functions that are provided by the API. And, how to add, remove and position dashboard widgets using this API.

Behind the Scene of WordPress Dashboard Widgets

Internally, WordPress dashboard widgets are WordPress meta boxes. The Dashboard Widget API uses the WordPress meta box API to add, remove and position dashboard widgets.

Adding a Dashboard Widget

We can add a widget to the WordPress dashboard using the wp_add_dashboard_widget function. We need to wrap this function inside the wp_dashboard_setup hook.

Continue reading this article on SitePoint

closed #2

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.