Support » Plugin: Yoast SEO » Removing SEO menu from admin bar for non-admins

  • latinoleader


    In /wordpress-seo/inc/wpseo-non-ajax-functions.php, one can find the following:

     * Adds an SEO admin bar menu with several options. If the current user is an admin he can also go straight to several settings menu's from here.
    function wpseo_admin_bar_menu() {
            // If the current user can't write posts, this is all of no use, so let's not output an admin menu
            if ( !current_user_can( '<strong>edit_posts</strong>' ) )

    If I replaced the bolded capability with, say, delete_users, will that make the SEO menu show up in the admin bar ONLY for admins????

  • The topic ‘Removing SEO menu from admin bar for non-admins’ is closed to new replies.