Hide Beaver Builder Templates From Non-Administrators
Removes the Beaver Builder templates and saved rows menu from wp-admin for everyone but administrators, so shared layouts are not edited by mistake.
Opens WPIDE on
Code
add_action( 'admin_menu', function () {
if ( ! current_user_can( 'manage_options' ) ) {
remove_menu_page( 'edit.php?post_type=fl-builder-template' );
}
}, 999 );
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.