Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #371028

    Is it possible to get the Avia Layout Builder for blog posts? I’m half way through designing my website and I’ve used the Avia Layout Builder on my pages and it was so helpful and easy. But now I’m adding my blog post and I noticed that there is no toggle to activate the Avia Layout Builder.

    Am I missing something? Is there an option to toggle it on in the settings?

    #371029

    Hi stwroids,
    see Enfold Documentation articles Use the Layout Builder with any post type

    • This reply was modified 9 years, 11 months ago by begrafiks.
    #371047

    Thank you for the reply begrafiks,

    I had just uploaded a child theme and I just wanted to double check with everybody before I mess something up :)

    Would I just copy that snippet into my style.css in the child-theme folder? And it also said to replace the word ‘post’ with my custom post type, I’m not really understanding what that means. Could you explain?

    Thanks!

    #371062

    Hey!

    No, the snippet must go inside the child theme functions.php (create one if needed):

    <?php
    add_filter('avf_builder_boxes', 'add_builder_to_posttype');
    
    function add_builder_to_posttype($metabox)
    {
    	foreach($metabox as &$meta)
    	{
    		if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout')
    		{
    			$meta['page'][] = 'post'; /*instead add the name of the custom post type here*/
    		}
    	}
    	
    
    	return $metabox;
    }
    

    Cheers!
    Josue

    #371067

    Thank you Josue!

    I will do that right now, but what do I put where it says “instead add the name of the custom post type here”?

    #371081

    Just leave it as it is.

    #371082

    It worked, thank you!

    Out of curiosity, why is the Avia Layout Builder not built for post without adding this snippet?

    #371085

    Hey!

    Because Posts have built-in elements like comments and share links, when you enable ALB on a post/page/portfolio it creates an empty canvas for you to have total control of the layout.

    Regards,
    Josue

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