Created
July 24, 2022 00:35
-
-
Save SitesByYogi/de4b9cf31cd996faf530bb9d04da5214 to your computer and use it in GitHub Desktop.
Add a custom dashboard widget to WordPress admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets'); | |
function my_custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
wp_add_dashboard_widget('custom_help_widget', 'Theme Support', 'custom_dashboard_help'); | |
} | |
function custom_dashboard_help() { | |
echo '<p>Welcome to Custom Blog Theme! Need help? Contact the developer <a href="mailto:yourusername@gmail.com">here</a>. For WordPress Tutorials visit: <a href="https://www.wpbeginner.com" target="_blank">WPBeginner</a></p>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment