Site logo

Archived topic

Editor roles

8 replies · Started by marc0s on February 18, 2016

Viewing posts 1–9 of 9

Hey Tom,

I give access to editor user to see the appereance option with this code:

$role_object = get_role( 'editor' );
$role_object->add_cap( 'edit_theme_options' );

Work fine, but, it possible to hide the Generatepress option in this menu for editor users.

I don't want to anybody see the GP Premium code.

EDITOR MENU OPTION
Editor menu options

Thanks for advance

The GeneratePress page will only show for users with the edit_theme_options capability.

Any reason you're giving that to editors?

Let me know :)

Hey Tom!

I actually have a use-case for this.

I've invited someone to create some Elementor pages on a GeneratePress Premium site.

But they couldn't find either of these options as an "Editor":

1.) http://d.pr/i/OU3l
2.) http://d.pr/i/p1Hq

So I had to upgrade them to "Admin", which I really do not want to do with certain people on certain projects.

Any functions.php filters or workarounds here?

Or maybe a future checkbox in GeneratePress, similar to how Elementor itself has? Like this: http://d.pr/i/FCTh

Thanks for your help!

~ Chris Moore

Sorry, my use-case wasn't exactly 100% related to this thread. My apologies...

But still has to do with the "Editor" role at least... haha

Thanks Tom!

What's the exact code to allow for the 2 boxes I shared in the screenshot above? For the Editor role.

That filter applies to all GP meta boxes.

So you could do this:

add_filter( 'generate_metabox_capability','tu_custom_metabox_cap' );
function tu_custom_metabox_cap() {
    return 'edit_posts';
}

Boom! Thank you...

You're welcome :)

This archived topic is closed to new replies.