Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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

    #394965

    Hi 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,
    Ismael

    #395095

    Thanks 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

    #395405

    Hey!

    You can put that code in a child theme functions.php to avoid being overwritten by updates.

    Best regards,
    Josue

    #1063813

    Hi 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,
    Leyden

    #1064415

    Hi,

    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,
    Ismael

    #1064427

    So 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,
    Leyden

    #1065287

    Hey!

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.