[Resolved] Hiding menus in the dashboard

Home Forums Support [Resolved] Hiding menus in the dashboard

Home Forums Support Hiding menus in the dashboard

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2156912
    Gerva

    Good morning
    I have the need to hide some menu items from the client.
    I have found a solution for all of them or almost, but the item Elements of Generatorpress I just can’t.

    I have tried several solutions without result

    	remove_submenu_page( 'edit.php', 'gp_elements' ); // GeneratePress Elements
    	remove_menu_page( 'edit.php?post_type=gp_elements' ); //GeneratePress Elements

    Using plugin Snippets for code inclusion

    Thanks for the support

    #2157314
    Fernando
    Customer Support

    Hi Gerva,

    Here is a PHP snippet you may try:

    function wpdocs_adjust_the_wp_menu() {
        remove_submenu_page( 'themes.php', 'edit.php?post_type=gp_elements' );
    }
    add_action( 'admin_menu', 'wpdocs_adjust_the_wp_menu', 999 );

    Hope this helps. 🙂

    #2157510
    Gerva

    Yes .. 😉
    very well
    thanks

    #2157563
    Fernando
    Customer Support

    You’re welcome Gerva! Glad that’s working! Feel free to reach out anytime if you’ll need assistance with anything else. 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.