Add new dashboard widget

// Add new dashboard widget
function new_dash_widget_function() { ?>
	<p>Some text or Html.</p>
<?php }
function add_dashboard_widgets() {
  wp_add_dashboard_widget('new_dash_widget', 'Your_Widget_name', 'new_dash_widget_function');
add_action('wp_dashboard_setup', 'add_dashboard_widgets');

Source: 10+ Useful WordPress Code Snippets

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.