Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #417930

    Hurray for the awesome tutorial “Displaying custom post types inside of the Avia Layout Builder”. This worked really well!
    Ref: https://kriesi.at/support/topic/displaying-custom-post-types-inside-of-the-avia-layout-builder/

    But, to preserve my changes, am I able to add that file with folder structure (/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/config/meta.php) to my child theme? I don’t want to re-hack the theme each time there is an upgrade. And- would you consider a future UI for theme options just to add the custom post types?

    #418331

    I’m wondering the same thing. What’s the response to this? I don’t want to keep making changes to the core files after every theme update.

    #418674
    #418745

    This looks good to shortcodes, but does it work for the Avia page builder?
    Maybe replacing:
    array_unshift($paths, $template_url.’/shortcodes/’);
    with
    array_unshift($paths, $template_url.’/meta/’);
    Then creating the folder structure (/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/config/meta.php) in child theme?

    #419261

    Hi!

    Revert the modifications back then add this to the child theme’s functions.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'][] = 'movie'; /*instead add the name of the custom post type here*/
    		}
    	}
    	
    
    	return $metabox;
    }

    Replace “movie” with the name of your own custom post type.

    Cheers!
    Ismael

    #419334

    Thanks Ismael! I’ll let you know how this works for me when I implement it.

    #419344

    Hey!

    We will keep the thread open and wait to hear from you!

    Best regards,
    Yigit

    #419935

    Hi all,

    This seems to work just fine. Thank you Ismael!

    #420292

    Hey!

    Great, glad we could help.

    Regards,
    Rikard

    #421519

    Yes, this worked well for me too!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Enfold: Saving post type inclusion in child theme’ is closed to new replies.