Last active
November 18, 2016 16:59
-
-
Save kerelist/31ffc173c1ac9dc5487db10484bb1468 to your computer and use it in GitHub Desktop.
Add an example custom widget to the WordPress Dashboard
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
function project_add_dashboard_widgets() { | |
wp_add_dashboard_widget( | |
'project_hint_dashboard_widget', // Widget slug. | |
'Title Here', // Title. | |
'project_hint_dashboard_widget_function' // Display function. | |
); | |
} | |
//this function matches the display function in the above code | |
function project_hint_dashboard_widget_function() { | |
echo '<p>Put your instructions here!</p>'; | |
} | |
add_action( 'wp_dashboard_setup', 'project_add_dashboard_widgets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment