• Like to remove WordPress News widget from dashboard. I tried adding the following code but its not working. Someone help please.

    function remove_dashboard_widgets() {
    remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ );
    remove_meta_box( ‘dashboard_recent_comments’, ‘dashboard’, ‘normal’ );
    remove_meta_box( ‘dashboard_incoming_links’, ‘dashboard’, ‘normal’ );
    remove_meta_box( ‘dashboard_plugins’, ‘dashboard’, ‘normal’ );
    remove_meta_box( ‘dashboard_quick_press’, ‘dashboard’, ‘side’ );
    remove_meta_box( ‘dashboard_recent_drafts’, ‘dashboard’, ‘side’ );
    remove_meta_box( ‘dashboard_primary’, ‘dashboard’, ‘side’ );
    remove_meta_box( ‘dashboard_secondary’, ‘dashboard’, ‘side’ );

    }
    add_action( ‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );

    • This topic was modified 7 years, 3 months ago by chena.
Viewing 9 replies - 1 through 9 (of 9 total)
  • No need to mess with code. Just click on “Screen Options” at the upper right hand corner and untick the box marked “WordPress News”.

    Thread Starter chena

    (@chena123)

    I want to remove it from all users by default.

    Try this:

    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', 'side' );
    	remove_meta_box( 'dashboard_secondary', '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' );
    	remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );
    	remove_meta_box( 'woocommerce_dashboard_recent_reviews', 'dashboard', 'normal' );
    	remove_meta_box( 'dlm_popular_downloads', 'dashboard', 'normal' );
    }
    add_action( 'admin_init', 'remove_dashboard_meta' );

    Of course You can remove Woocommerce and Download Monitor or any other if You can keep it.

    In addition:
    remove_action( 'welcome_panel', 'wp_welcome_panel' );

    Thread Starter chena

    (@chena123)

    Its not removing the widget. any plugin available to remove it?

    Could You post a screenshot?

    Thread Starter chena

    (@chena123)

    What version of WP You are using?

    I use 4.8.1 and this widget is called like shown on the screen.
    SCREEN

    Maybe You are using oldest version?

    Check id of this widget:
    WIDGET

    Thread Starter chena

    (@chena123)

    Looks the same. I have no idea why it is not working for You. I use this code and works.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Removing WordPress News widget from dashboard’ is closed to new replies.