[Support request] prevent access to theme options

Home Forums Support [Support request] prevent access to theme options

Home Forums Support prevent access to theme options

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #750378
    Simone

    Hi,

    how can I allow editors to edit menus and prevent their access to theme options via GP Premium Plugin?

    This is my functions.php:

    if (current_user_can(‘editor’)) {
    $role_object = get_role( ‘editor’ );
    $role_object->add_cap( ‘edit_theme_options’ );
    function hide_menu() {
    remove_submenu_page( ‘themes.php’, ‘themes.php’ );
    remove_submenu_page( ‘themes.php’, ‘widgets.php’ );
    remove_submenu_page( ‘themes.php’, ‘themes.php?page=generate-options’ );
    global $submenu;
    unset($submenu[‘themes.php’][6]);
    }
    add_action(‘admin_head’, ‘hide_menu’);
    }

    The editor role still sees “Design > GeneratePress” and this way has access to theme options, which I don’t want.
    Plugin Adminimize or User Role Editor doesn’t help either.

    thanks for helping

    #750560
    David
    Staff
    Customer Support
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.