Archived topic
Hiding menus in the dashboard
3 replies · Started by Gerva on March 16, 2022
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
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. :)
Yes .. ;-)
very well
thanks
You’re welcome Gerva! Glad that’s working! Feel free to reach out anytime if you’ll need assistance with anything else. :)