April 6, 2008
9:23 am | Last updated: April 6, 2008 at: 9:26 am

By this time, everyone knows that WordPress 2.5 has new enhanced and  widgetized dashboard, that lets you add/remove items on the fly. But due to missing widget manager for dashboard, it’s not possible to add/remove items on the fly. Lots of people have asked me, how do we remove “news feeds” etc. from the dashboard? Here I’m writing steps to manually remove items, from the dashboard.

Note: 1. Before, you proceed, as always have a backup of your Database and WordPress core files.

The process is straight forward and requires just to steps to remove items from the widget of your choice. Here, I’m assuming you want to remove “WordPress Development”, “Planet”, and “Plugins” Feed items.

1. Go to wp-admin and open “index.php” in your favorite HTML editor.

Now scroll down and at line # 11, you’ll find <script> tag, look for the following lines and comment using “//” or delete (if you want to permanently remove) items.

jQuery('#dashboard_primary div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=devnews');
jQuery('#dashboard_secondary div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=planetnews');
jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=plugins');

Save your “index.php” and exit.

2. Go to wp-admin/includes folder and open “dashboard.php” in HTML editor.

2a. Look for the following lines and comment using “/* */” of delete (if you want to permanently remove).

// WP Plugins Widget
wp_register_sidebar_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_empty',
array( 'all_link' => 'http://wordpress.org/extend/plugins/', 'feed_link' => 'http://wordpress.org/extend/plugins/rss/topics/', 'width' => 'half' ),
'wp_dashboard_cached_rss_widget', 'wp_dashboard_plugins_output',
array( 'http://wordpress.org/extend/plugins/rss/browse/popular/', 'http://wordpress.org/extend/plugins/rss/browse/new/', 'http://wordpress.org/extend/plugins/rss/browse/updated/' )
);

2.b.Look for the following lines and comment using “/* */” of delete (if you want to permanently remove).

// Primary feed (Dev Blog) Widget
if ( !isset( $widget_options['dashboard_primary'] ) ) {
$update = true;
$widget_options['dashboard_primary'] = array(
'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/development/' ) ),
'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/development/feed/' ) ),
'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress Development Blog' ) ),
'items' => 2,
'show_summary' => 1,
'show_author' => 0,
'show_date' => 1
);
}
wp_register_sidebar_widget( 'dashboard_primary', $widget_options['dashboard_primary']['title'], 'wp_dashboard_empty',
array( 'all_link' => $widget_options['dashboard_primary']['link'], 'feed_link' => $widget_options['dashboard_primary']['url'], 'width' => 'half', 'class' => 'widget_rss' ),
'wp_dashboard_cached_rss_widget', 'wp_dashboard_rss_output'
);
wp_register_widget_control( 'dashboard_primary', __( 'Primary Feed' ), 'wp_dashboard_rss_control', array(),
array( 'widget_id' => 'dashboard_primary' )
);

2c. Look for the following lines and comment using “/* */” of delete (if you want to permanently remove).

// Secondary Feed (Planet) Widget
if ( !isset( $widget_options['dashboard_secondary'] ) ) {
$update = true;
$widget_options['dashboard_secondary'] = array(
'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ),
'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ),
'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ),
'items' => 15
);
}
wp_register_sidebar_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_empty',
array( 'all_link' => $widget_options['dashboard_secondary']['link'], 'feed_link' => $widget_options['dashboard_secondary']['url'], 'width' => 'full' ),
'wp_dashboard_cached_rss_widget', 'wp_dashboard_secondary_output'
);
wp_register_widget_control( 'dashboard_secondary', __( 'Secondary Feed' ), 'wp_dashboard_rss_control', array(),
array( 'widget_id' => 'dashboard_secondary', 'form_inputs' => array( 'show_summary' => false, 'show_author' => false, 'show_date' => false ) )
);

Save your dashboard.php file and exit.

3. Go to wp-admin folder and open “index-extra.php” in HTML editor. Look for the following lines and comment using “/* */” of delete (if you want to permanently remove).

case 'devnews' :
	wp_dashboard_rss_output( 'dashboard_primary' );
	break;

case 'planetnews' :
	wp_dashboard_secondary_output();
	break;

case 'plugins' :
	wp_dashboard_plugins_output();
	break;

Save your dashboard.php file and exit. If you edited these files on your local computer, re-upload edited index.php to wp-admin folder & dashboard.php to wp-admin/includes folder.

Now Login to your WordPress admin panel and enjoy.

WordPress, Brecker, Dashboard, Widget, Widgets, How To, Tips, Tricks, Tips and Tricks

Loading

Contextual Related Posts:

6 Responses | RSS comments on this post | Leave a comment»

  1. 1
    Alex says#6 | August 28th, 2009 at 2:48 am

    I have been developing a plugin to remove the widgets on the dashboard in WP 2.8.4, you should just be able to add the id's of the widgets you want to remove in the do_meta_boxes function.

    add_action('do_meta_boxes', array(&$this, 'do_meta_boxes'),10,3);

    function do_meta_boxes($type, $context, $post)
    {
    remove_meta_box('dashboard_quick_press', $type, $context);
    }

  2. 2
    Subir Ghosh says#5 | November 3rd, 2008 at 8:20 am

    Phew!

    That's all that I can say. Thanks a tonne, mate :)

  3. 3
    DG says#4 | August 2nd, 2008 at 5:48 am

    That's true, but this hack is useful, if you're running on plugins crash-diet.

  4. 4
    Kym says#3 | August 2nd, 2008 at 3:08 am

    The widget items are damn annnoying. :(

    They increase the loading time of such an important page.

    And making modifications can be useless as one would forget about making them. So upon an automatic upgrade to the latest version of WordPress...the widget items come back to haunt you. :(

  1. Pingback from
    1
    wordpress 2.5 | cisco biscuits says:April 26th, 2008 at 6:25 pm

    [...] page apparently along similar lines, no luck in the forums etc so far but i did find this fix for the drag and drop widget editor, not attempted it yet but i will probably have to, 2.5.1 hit the streets yesterday and that [...]

  2. Pingback from
    2
    WordPress 2.5: How to display Technorati links on the dashboard? » D' Technology Weblog: Technology, Blogging, Tips, Tricks, Computer, Hardware, Software, Tutorials, Internet, Web, Gadgets, Fashion, LifeStyle, Entertainment, News and more by Deepak  says:April 10th, 2008 at 2:29 am

    [...] You may also like to read, “how to remove widgets from the dashboard?“ [...]

Leave a Response

Comment Preview
« Google Spreadsheet TranslationWindows Vista Desktop Wallpaper »
Feed Icon

Subscribe via RSS or email: