WordPress custom dashboard widget
//----- Dashboard widget ----- // function for creating widget view // Function that outputs the contents of the dashboard widget. // The function should echo its output. function simple_dashboard_widget_function() { // Display whatever you want to show echo '<iframe src="http://www.workassis.com" width="100%" height="300" frameBorder="0">Browser not compatible.</iframe>'; } // Create the function use in the action hook function add_dashboard_widgets() { wp_add_dashboard_widget('simple_dashboard_widget', 'Simple Dashboard Widget', 'simple_dashboard_widget_function'); } // Register the new dashboard widget with the 'wp_dashboard_setup' action add_action('wp_dashboard_setup', 'add_dashboard_widgets' ); //-------End of Dashboard widget--------
Related topics
- WordPress create custom dashboard widget using meta box – https://wiki.workassis.com/wordpress-create-custom-dashboard-widget-using-meta-box/
- WordPress create custom advanced dashboard widget – https://wiki.workassis.com/wordpress-create-custom-advanced-dashboard-widget/
ref: https://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget