Skip to content

Instantly share code, notes, and snippets.

@erikccoder
Created May 10, 2013 04:48
Show Gist options
  • Save erikccoder/5552440 to your computer and use it in GitHub Desktop.
Save erikccoder/5552440 to your computer and use it in GitHub Desktop.
wordpress create widget in dashboard
// Add a widget in WordPress Dashboard
function wpc_dashboard_widget_function(){
// Entering the text between the quotes
echo "<ul>
<li>Release Date: March 2012</li>
<li>Author: Aurelien Denis.</li>
<li>Hosting provider: my own server</li>
</ul>";
}
function wpc_add_dashboard_widgets(){
wp_add_dashboard_widget('wp_dashboard_widget','Technical information','wpc_dashboard_widget_function');
}
add_action('wp_dashboard_setup','wpc_add_dashboard_widgets');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment