• Hi all – I’m customizing my dashboard and have used the codex instructions successfully. However, my WordPress News meta box stubbornly refuses to go away! It’s ID is set to ‘dashboard_primary’ and according to the instructions I have this in my function:

    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_primary']);

    But it’s still there. Any idea why?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Instead of unsetting a global variable I would just use the remove_meta_box function() instead. Here is how I remove all the dashboard widgets.

    function remove_dashboard_meta() {
            remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
            remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
            remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );
            remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
            remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
            remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
            remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
            remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
            remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
    }
    add_action( 'admin_init', 'remove_dashboard_meta' );
    Thread Starter robahas

    (@robahas)

    Thanks Chris – Worked great.

    where will i use the code.>? in the theme functions ? please help me

    **chhelp** – You can put this code in the your theme’s functions.php and it should work fine.

    Nickohrn

    Thank You Very Much For Haeling Me Out !!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Programatically remove the WordPress News Widget from the dashboard’ is closed to new replies.