Posted on Apr 6, 2008, 9:23 am, UTC
Updated on Apr 6, 2008, 9:26 am, UTC

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

Leave a Reply

7 Responses to “WordPress 2.5 (Brecker) Dashboard: How to remove widget items?”

  1. Kym - August 1, 2008

    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. :(

  2. DG - August 1, 2008

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

  3. Subir Ghosh - November 3, 2008

    Phew!

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

  4. Alex - August 27, 2009

    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);
    }

  5. alina - June 21, 2010

    but how to do this in the wp 2.9.2?
    As i need to remove the wordpress development blog nad other wordpress news form the page

  1. wordpress 2.5 | cisco biscuits - April 26, 2008

    [...] 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 [...]

Find us on Facebook