Archived topic
How to remove / hide 'Elements' on submenu dashboard?
3 replies · Started by Antonio Pusano on July 25, 2022
Hi there! i need to remove sub-menu 'Elements' from the admin dashboard.
Can you give me some code?
I have try several code from internet, but no result. Thanks..
Antonio,
We recommend a plugin like Adminize: https://en-ca.wordpress.org/plugins/adminimize/
Hope this helps!
I'm sorry, but i want to use the code, instead of adding a new plugin :(
My site now is installed so many plugins :(
Try this:
add_action( 'admin_init', function() {
remove_submenu_page( 'themes.php', 'edit.php?post_type=gp_elements' );
} );
Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets