Code To Add Custom Dashboard Widgets in WordPress - WPTRINITY

Code To Add Custom Dashboard Widgets in WordPress

For this you can add Code by pasting the following code in function.php file.

add_action('wp_dashboard_setup', 'wpe_custom_dashboard_widgets');
 
function wpe_custom_dashboard_widgets() {
global $wp_meta_boxes;
 wp_add_dashboard_widget('custom_help_widget', 'Theme Support Wpeakrt', 'custom_dashboard_help_wpe');
}
 
function custom_dashboard_help_wpe() {
echo '<p>Welcome to Custom Blog Theme! Need help? Contact the developer</p>';
}