[Support request] Hide GeneratePress from Dashboard in Editor view…

Home Forums Support [Support request] Hide GeneratePress from Dashboard in Editor view…

Home Forums Support Hide GeneratePress from Dashboard in Editor view…

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #352877
    Dan

    I’ve also posted a message to the Plugin developer. We’ll see what they say and I’ll let you know.

    #353093
    Tom
    Lead Developer
    Lead Developer

    Yea, really hard for me to know what’s going on, as I’m not sure what custom capabilities your users have.

    Have you tried this plugin instead?: https://en-ca.wordpress.org/plugins/user-role-editor/

    #358751
    Andy

    I had the same problems with the OP’s plugin and the plugin mentioned above, you can hide/show the main Appearance sub-menu but not individual items within that sub-menu.
    In the end I had to use this plugin:https://en-gb.wordpress.org/plugins/adminimize/ which seems to work well.

    #358919
    Tom
    Lead Developer
    Lead Developer

    Thanks for letting us know! 🙂

    #2549346
    Jason

    Hi guys. I read through this thread while working on the same issue of giving Editors access to Appearance > Menus but nothing else in the Appearance area of WordPress. I was able to accomplish this with the following (including removing the GeneratePress menu item):

    // Allow editors to see Appearance menu - This only needs to run once to update the database, so you can comment it out once editors can see the Appearance menu. If you want to stop editors seeing the Appearance menu, switch add_cap with remove_cap. Alternatively, you can use the User Role Editor plugin to provide access.
    $role_object = get_role( 'editor' );
    $role_object->add_cap( 'edit_theme_options' );
    
    function hide_menu() {
    	
    	if (current_user_can('editor')) {
     
    		// Hide theme selection page
    		remove_submenu_page( 'themes.php', 'themes.php' );
    
    		// Hide GeneratePress page
    		remove_submenu_page( 'themes.php', 'generate-options' );
    
    		// Hide widgets page
    		remove_submenu_page( 'themes.php', 'widgets.php' );
    
    		// Hide customize page
    		global $submenu;
    		unset($submenu['themes.php'][6]);
    		
    	}
    }

    This should work in your child theme functions.php file, or use something like the WPCode plugin to create a PHP code snippet.

    #2549352
    Leo
    Staff
    Customer Support

    Thanks for sharing!

Viewing 6 posts - 16 through 21 (of 21 total)
  • The topic ‘Hide GeneratePress from Dashboard in Editor view…’ is closed to new replies.