Want to give All in One SEO pack access to WordPress roles that are not Administrators? Here’s a quick solution.

I had a need to allow Editor roles access to a site’s AIOSEO settings. A quick internet search showed a few other users asking the same question, but no one ever answering it.

The answer is simple- use the add_cap() function.

Take the following code as-is or replace the role name with the one you want to give access to. Place it in your functions.php file.

It’s as easy as that.

Using the add_cap Function

function can_use_SEO() {
    if (is_admin()) { 
        $role = get_role( 'editor' );
        if ( is_object( $role ) ) $role->add_cap( 'aiosp_manage_seo' );
add_action( 'admin_init', 'can_use_SEO', 1 );