How To : Add Custom Dashboard Widget in WordPress

How To : Add Custom Dashboard Widget in WordPress

There’re few plugins which add custom widget in dashboard to get more attention, for example informing about their new versions or latest news about that plugin etc etc.

We can also add widget in dashboard easily for our plugins or themes with wordpress function “wp_add_dashboard_widget”

add_action('wp_dashboard_setup', 'our_dashboard_widget');

    function our_dashboard_widget(){

    wp_add_dashboard_widget('our_custom_widget', 'widget title', 'custom_dashboard_widget_function');

    }

    function custom_dashboard_widget_function(){

    //Your Dashboard Content

    }

Leave a Reply:

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