ControlledChaos
8/8/2016 - 2:32 PM

Create a custom widget for the WordPress dashboard.

Create a custom widget for the WordPress dashboard.

<?php

function ccd_dashboard_widget() {
    echo '
        <h2>Custom Dashboard Widget</h2>
        <p>Custom content here</p>
    ';
}

function ccd_add_dashboard_widget() {
    wp_add_dashboard_widget( 'custom_dashboard_widget', 'Custom Dashoard Widget', 'ccd_dashboard_widget' );
}
add_action( 'wp_dashboard_setup', 'ccd_add_dashboard_widget' );

?>

Custom Dashboard Widget

WordPress Snippet