Remove items from Admin Sidebar menu
-
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
Hello,
Check this article for help: https://runcloud.io/blog/reorder-wordpress-dashboard-menu
Let me know the result.
Kind Regards
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
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 );
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
The topic ‘Remove items from Admin Sidebar menu’ is closed to new replies.