Here’s an easy way to add a custom dashboard widget to your WordPress theme. This is a great way to add helper text for a custom theme to explain custom features of the theme, help your clients understand the theme, etc. Add the following to your functions.php file and edit the text below.
// Create the function to output the contents of our Dashboard Widget
function example_dashboard_widget_function() {
// Display whatever it is you want to show
echo "enter text for custom dashboard widget here";
}
// Create the function use in the action hook
function example_add_dashboard_widgets() {
wp_add_dashboard_widget('example_dashboard_widget', 'Site Details', 'example_dashboard_widget_function');
}
// Hook into the 'wp_dashboard_setup' action to register our other functions
add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );


