Yoast SEO
Removing SEO menu from admin bar for non-admins (1 post)

  1. latinoleader
    Posted 3 years ago #

    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????


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic