Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #302280

    Hi –
    I found the great tutorial about using the Layout Builder in Custom Posts.
    https://kriesi.at/support/topic/displaying-custom-post-types-inside-of-the-avia-layout-builder/

    Is there any easy way to do this with a Child Theme, or is it only possible to edit the meta.php file within config-template-builder in Enfold, which we would have to update everytime we update the enfold theme?

    • This topic was modified 10 years, 4 months ago by blankonblank.
    #302321

    Hi blankonblank!

    You can add this on the child theme’s functions.php.

    add_filter('avf_builder_boxes','enable_boxes_on_posts');
    function enable_boxes_on_posts($boxes) {
    	$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('page','post', 'portfolio'), 'context'=>'normal', 'expandable'=>true );
    	$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page','post', 'portfolio'), 'context'=>'side', 'priority'=>'low');
    	$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('page','post','portfolio'), 'context'=>'normal', 'priority'=>'high' );
    	
    	return $boxes;
    }

    Note that we don’t recommend this modification because there are certain issues when using the ALB on posts.

    Cheers!
    Ismael

    #302330
    This reply has been marked as private.
    #302355

    Hi!

    I edited my last comment above. My mistake. You can use a filter to add the ALB on post. Issues are usually minor like featured image not working, contents might not be rendered as usual etc.

    Best regards,
    Ismael

    #302380

    so do i need to always make sure the change is made to meta.php file within config-template-builder or will the change to functions.php in my child theme do the trick?

    #302612

    Hi!

    Inserting code to functions.php file of your child theme should do the trick

    Cheers!
    Yigit

    #302627

    perfect. and just confirming I put our slug in for “tribe_events” in the code above?

    #302836

    Hey!

    Yes, as long as that is the post type slug.

    The issue with enabling the ALB on posts is a bit deeper since the output for the builder is in a separate meta field than the regular post data. So queries returned on content created with the builder show as blank.

    Its a significant code change to make it universally usable but I know Kriesi has been looking into it a bit.

    Best regards,
    Devin

    #302862
    This reply has been marked as private.
    #303304

    That should work from the way you’ve described it. It shouldn’t be more than an hour to do a mock up on a dev site so you can test it out a bit.

    If the “posts” don’t need to be actual WordPress posts then making them pages is definitely fine. The big reason I don’t like making the change for posts to use the ALB right now is that post data would not be transportable to a new theme later on and since most users tend to want to use the blog/post functionality as a true blog it can mean a lot of extra work later on.

    #303311
    This reply has been marked as private.
    #303656

    Hi!

    I’ll ask the rest of the support team if they’re available for this particular task. You can also visit Envato Studio or Werkpress for further customization.

    Cheers!
    Ismael

    #303900

    I freelance through Codeable.io when available.

    #305811
    This reply has been marked as private.
    #305820
    #305827
    This reply has been marked as private.
    #305958

    Hi,

    I’ve sent you a e-mail to see if i can help you out.

    Regards,
    Josue

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