• I would like to remove the dashboard widget and I noticed there is an X to remove it, but when I reload, it always comes back. I tried removing it using the UNSET method in my functions.php file, but can’t get that to work.

    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You can always hide widgets from the screen options tab.

    Thread Starter katart17

    (@katart17)

    I know that is an option and probably what I will end up doing, but I want to hide it from all users below Level 10 (Administrators).

    I have a same problem. Close button doesn’t work and even unset function in functions file won’t remove it, like it does other widgets.

    =(

    I am having the same issue as well. Clicking the x brings up the note:

    “If you reload, this widget will be gone and never appear again, unless you decide to delete the database option ‘yoastdbwidget’.”

    and then if I reload, the widget comes back in full force.

    This is also still happening with the latest version of WP 3.0.4.

    I’m new to wordpress and coding but

    I have removed

    if ( !isset($options[‘removedbwidget’.$network]) || !$options[‘removedbwidget’.$network] )
    wp_add_dashboard_widget( ‘yoast_db_widget’ , ‘The Latest From Yoast’ , array(&$this, ‘db_widget’) );

    from yst_plugin_tools.php file (wordpress-seo/admin/ directory) and the widget disappeared

    Thanks doubled! I tried removing a few things like that whole function, but I guess I was just going too big.

    I have just commented it out, and it is working as advertised.

    Thanks again

    KS

    (@karl19)

    This is what we just used to hide a bunch of widgets for contributors and subscribers:

    function tidy_dashboard() {
      global $wp_meta_boxes, $current_user;
      // remove incoming links info for contributors or subscribers
      if(in_array('contributor', $current_user->roles) || in_array('subscriber', $current_user->roles))
      {
        unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    	unset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);
    	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_addthis']);
    	unset($wp_meta_boxes['dashboard']['normal']['core']['events_dashboard_window']);
    	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
      }
    }
    //add our function to the dashboard setup hook
    add_action('wp_dashboard_setup', 'tidy_dashboard');
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Remove WordPress SEO dashboard widget’ is closed to new replies.