Created
April 24, 2012 15:29
-
-
Save baczoni/2480628 to your computer and use it in GitHub Desktop.
Wordpress: Add a dashboard widget
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 function your_dashboard_widget() { ?> | |
<h3>Hello Wordpress user!</h3> | |
<p>Fill this with HTML or PHP.</p> | |
<?php }; | |
function add_your_dashboard_widget() { | |
wp_add_dashboard_widget( 'your_dashboard_widget', __( 'Widget Title!' ), 'your_dashboard_widget' ); | |
} | |
add_action('wp_dashboard_setup', 'add_your_dashboard_widget' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment