Add a Dashboard Widget

The first thing a user sees when logging in is the WordPress Dashboard. It’s filled with widgets, which the user can interact with. To add your own, just add this code to functions.php

Code Snippet:

<?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' );

Posted in Admin area