Hi in a recent project we can’t select a CPT as an entry of an ALB element (Masonry, Postslider, Magazine ).
We have other sites enabled by add_avia_builder_post_type_option but the lastone we have created the option is missed.
How to enable in 7.1.2 ?
Guess you had to know the exact post-type of your CPT
f.e. tribe_events or event etc. pp.
then you can register this post-type for the advanced layout builder:
function avf_alb_supported_post_types_mod( array $supported_post_types ) {
$supported_post_types[] = 'tribe_events';
return $supported_post_types;
}
add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
can you try that first.
maybe this is an option too:
function enable_boxes_on_elements($boxes) {
$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('page', 'post', 'portfolio', 'alb_custom_layout'), 'context'=>'normal', 'expandable'=>true );
$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('page', 'post', 'portfolio', 'alb_custom_layout'), 'context'=>'side', 'priority'=>'low');
return $boxes;
}
add_filter('avf_builder_boxes','enable_boxes_on_elements');
change the alb_custom_layout to your post-type you like to add.
btw. maybe your filter add_avia_builder_post_type_option had to be activated first.
add_theme_support('add_avia_builder_post_type_option' );
