Hello we have created a new custom post type (proyectos_ma) and we would like to use the Avia Layout Builder in this type of new content to build the pages.
How can we do it?
Thanks.
can you please test this in your child-theme functions.php:
function avf_alb_supported_post_types_mod( array $supported_post_types ) {
$supported_post_types[] = 'proyectos_ma';
return $supported_post_types;
}
add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
function avf_metabox_layout_post_types_mod( array $supported_post_types ) {
$supported_post_types[] = 'proyectos_ma';
return $supported_post_types;
}
add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
PS: if you like to include your CPT to search results use:
function include_cpt_search( $query ) {
if ( $query->is_search ) {
$query->set( 'post_type', array( 'post', 'page', 'proyectos_ma' ) );
}
return $query;
}
add_filter( 'pre_get_posts', 'include_cpt_search' );