Tagged: avia layout builder, enfold, Hide, users
-
AuthorPosts
-
February 11, 2015 at 8:13 pm #394650
Is it possible to hide the Avia Layout Builder from certain users? I don’t want any other users but myself to see the builder. I’m hoping if they see the built in editor for WP that they will be scared away and won’t touch that part of the site. I know I can change their user privileges to something other than an editor but I would like them to feel like they have everything right there and I am not hiding anything from them.
I know other similar builders have that option but I don’t see it within the Enfold – Avia Layout Builder options.
Thanks
- This topic was modified 9 years, 9 months ago by tippingpointus.
February 12, 2015 at 1:23 pm #394965Hi tippingpointus!
Thank you for using Enfold.
If it’s ok to ask, which theme builders have this role/user option? Personally, I don’t know any builders with that option included by default. Anyway, you can try this on functions.php:
add_filter('avf_builder_boxes','custom_post_types_options'); function custom_post_types_options($boxes) { $user_info = get_userdata(1); $user_login = $user_info->user_login; if ($user_login == 'admin') { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('page'), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page'), 'context'=>'side', 'priority'=>'low'); $boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('page'), 'context'=>'normal', 'priority'=>'high' ); }else { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array(), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('post','page'), 'context'=>'side', 'priority'=>'low'); $boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('post','page'), 'context'=>'normal', 'priority'=>'high' ); } return $boxes; }
Change the $user_login comparison to the your login username.
Regards,
IsmaelFebruary 12, 2015 at 3:51 pm #395095Thanks Ismael!
I’m sure with updates to the theme this will be overwritten? I like this idea a lot and it would be cool if you incorporated it into an upcoming release.
One of the builders I can think of off the top of my head and I believe they were one of the first to the game is WP Bakery – Visual Composer. http://vc.wpbakery.com/
Thanks
- This reply was modified 9 years, 9 months ago by tippingpointus.
February 12, 2015 at 11:27 pm #395405Hey!
You can put that code in a child theme functions.php to avoid being overwritten by updates.
Best regards,
JosueFebruary 7, 2019 at 4:53 am #1063813Hi all,
The WP Bakery Page Builder allows you to hide all options for all non-admin users and only lets them use the saved templates. This is AMAZING when you build specific templates for clients and don’t want them to destroy everything. You can only let them use the saved templates and if they need something, you can build it and save it to templates for them to use.
I feel like the Enfold Avia Builder is ready for this. You have all elements above the templates button. You can remove everything and just leave the templates button.
Thanks,
LeydenFebruary 8, 2019 at 6:02 am #1064415Hi,
Thanks for the info.
You can now manually disable elements in the builder or only load the elements that were added in the page. Go to the Performance panel and look for the “Disable Template Builder Elements” section. Unfortunately, you can’t set it for a specific user role.
Best regards,
IsmaelFebruary 8, 2019 at 6:31 am #1064427So if I create several templates with the Avia Builder and save them to the templates button, and then I disable all the elements, can you still use the “Templates” button? Can you still edit the pages created with the Avia Builder?
Thanks,
LeydenFebruary 11, 2019 at 5:40 am #1065287Hey!
Yes, you can still edit the existing elements from the templates but you won’t be able to insert additional elements or shortcodes.My bad. I tested it again just now. It turned out that you can’t use the elements after disabling them even it was pre-added in the templates.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.