Home Forums WoodMart support forum Remove items from Admin Sidebar menu

Remove items from Admin Sidebar menu

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #640236

    Maxor
    Participant

    Hi

    I would like to remove the following items from WordPress admin menu :

    theme settings
    layouts
    HTML blocks
    Slides
    Sidebars
    Projects

    as i only want to keep one item in the menu : Woodmart
    (i also have the quick menu in the admin bar)

    How can i do that ?

    Thank you

    #640442

    Luke Nielsen
    Keymaster

    Hello,

    Check this article for help: https://runcloud.io/blog/reorder-wordpress-dashboard-menu

    Let me know the result.

    Kind Regards

    #640511

    Maxor
    Participant

    ok thank you

    #640512

    Luke Nielsen
    Keymaster

    Hello,

    You are welcome! Always remember that you can reach out to us with any questions you may have.

    Wish you all the best.

    Kind Regards

    #671170

    Maxor
    Participant

    Here is the good function to achieve this

    function magic_remove_menus() {
        // Supprime les pages du menu
        remove_menu_page( 'xts_theme_settings' ); // Page des paramètres du thème
        remove_menu_page( 'edit.php?post_type=woodmart_layout' ); // Page de mise en page
        remove_menu_page( 'edit.php?post_type=cms_block' ); // Page CMS Block
        remove_menu_page( 'edit.php?post_type=woodmart_slide' ); // Page des slides
        remove_menu_page( 'edit.php?post_type=woodmart_sidebar' ); // Page des barres latérales
        remove_menu_page( 'edit.php?post_type=portfolio' ); // Page du portfolio
    
        // Supprime aussi les sous-menus si nécessaire
        remove_submenu_page( 'edit.php?post_type=woodmart_layout', 'edit.php?post_type=woodmart_layout' );
        remove_submenu_page( 'edit.php?post_type=cms_block', 'edit.php?post_type=cms_block' );
        remove_submenu_page( 'edit.php?post_type=woodmart_slide', 'edit.php?post_type=woodmart_slide' );
        remove_submenu_page( 'edit.php?post_type=woodmart_sidebar', 'edit.php?post_type=woodmart_sidebar' );
        remove_submenu_page( 'edit.php?post_type=portfolio', 'edit.php?post_type=portfolio' );
    }
    add_action( 'admin_menu', 'magic_remove_menus', 999 );
    #671205

    Luke Nielsen
    Keymaster

    Hello,

    Thank you for your follow-up and for sharing the function with us. This code looks great for removing the specified items from the WordPress admin menu. If you need further assistance or have additional questions, please feel free to reach out.

    Kind Regards

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Remove items from Admin Sidebar menu’ is closed to new replies.