WordPress: Give Editors Access to Yoast SEO

With a simple PHP add-on, you can give WordPress users with the "editor" role access to Yoast SEO in WP admin.

This feature is added in your theme's functions.php file and allows editors to gain access without needing admin rights.

add_cap( 'wpseo_manage_options' );
?>

To remove access again, you can use:

remove_cap( 'wpseo_manage_options' );
?>

The access rights added via this feature are permanently stored in the WordPress database and therefore do not need to be a permanent part of your theme. Once you run the function once, the permissions are stored until they are actively removed again. The function can therefore be removed from functions.php after it has been run.

If you later want to remove the rights from the editor role, you can add a similar function with remove_cap, run it once and then remove the code again.