WordPress 2.5 (Brecker) Dashboard: How to remove widget items?

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

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