Word Press

How to Add Custom Dashboard Widgets in WordPress?

Copy and paste Below code in your function.php file


add_action('wp_dashboard_setup', 'my_own_custom_dashboard_widgets');

function my_own_custom_dashboard_widgets() 
{
    global $wp_meta_boxes;
    wp_add_dashboard_widget('custom_help_widget', 'Theme Support', 'custom_dashboard_help');
}
// This Function is chaining function for my_own_custom_dashboard_widgets
// This is display custom widget text.
function custom_dashboard_help() 
{
      echo '<p>Welcome to Custom Blog <a href="https://shahkeyul.wordpress.com/">Web Expert Developers</a>.</p>';
}
Advertisements

2 thoughts on “How to Add Custom Dashboard Widgets in WordPress?

Leave your comments

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s