Add dasboard widget message for your client

This snippet builds a custom admin dashboard widget. Customize as required and leave a messagelink for your customer.

/**
 * Snippet Name: Add dasboard widget message for your client
 * Snippet URL: https://www.wpcustoms.net/snippets/add-dasboard-widget-message-for-your-client/
 */
  function wpc_dashboard_widget_function() {
    // Display whatever it is you want to show
    echo "Leave a message for your client here.";
} 
  
// Create the function use in the action hook
function example_add_dashboard_widgets() {
    wp_add_dashboard_widget('custom_dashboard_widget', 'Custom Dashboard Widget', 'wpc_dashboard_widget_function');
}
// Hoook into the 'wp_dashboard_setup' action to register our other functions
add_action('wp_dashboard_setup', 'custom_dashboard_widget' ); 

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x