Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #989251
    Steven MORLIER
    Participant

    Hello,
    I want to remove portfolio menu item, I don’t need to desactivate portfolio, only remove item from admin menu (to clean editors admin bar). Can I use something like this:

    function MyCleanPlugin_remove_menus(){
    remove_menu_page( ‘x-portfolio’ ); //Can’t find the correct hook to do this…
    }
    add_action( ‘admin_menu’, ‘MyCleanPlugin_remove_menus’ );

    Thx.

    Steven

    #989254
    Steven MORLIER
    Participant

    Find the solution by myself – Sorry for the inconvenience. :p

    remove_menu_page( ‘edit.php?post_type=x-portfolio’ ); //x-Portfolio

    That find for me, but didn’t find de way to restrict the to editors only.

    #989264
    Lely
    Moderator

    Hello Steven,

    Please use this code instead:

    function MyCleanPlugin_remove_menus(){
    remove_menu_page( 'edit.php?post_type=x-portfolio' ); //Can’t find the correct hook to do this…
    }
    add_action( 'admin_menu', 'MyCleanPlugin_remove_menus' );
    

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-989251 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>