The WordPress dashboard is a layout for widgets, but some of them are, quiet frankly, useless. I certainly remove quite a lot of them from my dashboard, such as the WordPress news and under-featured QuickPress.
With the code below, we can add our own widgets to the dashboard. This can be useful to add custom stats, or maybe to provide contextual help. It's pretty simple to do so, simply place whatever you want to appear within the second function. Make sure you replace your name with the third parameter of the function on line 3 too.
function my_custom_dashboard_widgets() {global $wp_meta_boxes;wp_add_dashboard_widget('custom_help_widget', 'My Widget Title', 'custom_dashboard_help');}function custom_dashboard_help() {echo 'My widget content';}add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
No comments:
Post a Comment