• Hello All
    I am trying to hide menu and submenu from admin panel. I got success in hiding the default menu, I have created a taxonomy ( gallery) for page, post and one custom page called as portfolio
    Now I need to hide the taxonomy galleries for page,post and portfolio.
    Please let me out in writting the code for that,
    The code I am using to hide other sub menu is

    add_action( 'admin_menu', 'alvaro_remove_menus', 999 );
    
    function alvaro_remove_menus() {
    
    remove_submenu_page( 'index.php', 'update-core.php' );
    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );
    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=gallery' );
    
    }

    I tried with the below code to hide gallery from page sub menu but its not working
    remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=gallery&post_type=page' );

    Thanks in advance

  • The topic ‘hiding sub menu in admin panel’ is closed to new replies.