-
osaopaulo
Hello there!
I’d like to know if it is possible to disable Global Styles on GenerateBlocks, and also Asset Library.
We do not use them on our webistes, and for us it would be better to just disable these features on GenerateBlocks.Also, is it possible to remove the “Active Elements” metabox on the post edit page? Talking about this one: https://snipboard.io/T92CSq.jpg
Thanks!
-
Hi there,
to remove the admin menu items you can use this PHP Snippet:
function remove_nested_menu_items() { remove_submenu_page( 'generateblocks', 'generateblocks-styles' ); remove_submenu_page( 'generateblocks', 'generateblocks-asset-library' ); } add_action( 'admin_menu', 'remove_nested_menu_items' );
For the elements panel, see here:
https://generate.support/topic/disable-active-elements-for-non-admin-users/#post-33319
-
osaopaulo
Hi David!
For the elements panel, it worked!
But for the GenerateBlocks one, it didn’t… with the function you gave me, it continues to appear, as can be seen here: https://snipboard.io/NCImQR.jpgAny other solution?
-
Alvind
Hi there,
Update David’s code above with this one:
function remove_nested_menu_items() { remove_submenu_page( 'generateblocks', 'edit.php?post_type=gblocks_global_style' ); remove_submenu_page( 'generateblocks', 'generateblocks-asset-library' ); } add_action( 'admin_menu', 'remove_nested_menu_items' ); function remove_new_item_from_admin_bar( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'new-gblocks_templates' ); $wp_admin_bar->remove_node( 'new-gblocks_global_style' ); } add_action( 'admin_bar_menu', 'remove_new_item_from_admin_bar', 999 );
-
osaopaulo
Thanks, Alvin!
Worked fine!
-
Alvind
Glad to hear that!
- You must be logged in to reply to this topic.