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?
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.
Hey!
Please see – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
Cheers!
Yigit
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?
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
Thanks Ismael! I’ll let you know how this works for me when I implement it.
Hi all,
This seems to work just fine. Thank you Ismael!
Yes, this worked well for me too!