Enable Layout Builder for Custom post types Example
/**
* Enable Layout Builder for Custom Post Types
*/
add_theme_support('add_avia_builder_post_type_option');
add_theme_support('avia_template_builder_custom_post_type_grid');
add_filter('avf_builder_boxes','yanco_enable_cpt_layout_builder');
function yanco_enable_cpt_layout_builder( $boxes ) {
$boxex = array();
$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('post','portfolio','page','product','ugekursus','medarbejder','hoejskoleophold', 'valgfag'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true );
$boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page' , 'post', 'ugekursus', 'medarbejder', 'hoejskoleophold', 'valgfag'), 'context'=>'side', 'priority'=>'low');
$boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio'), 'context'=>'normal', 'priority'=>'high' );
$boxes[] = array( 'title' =>__('Breadcrumb Hierarchy','avia_framework' ), 'id'=>'hierarchy', 'page'=>array('portfolio'), 'context'=>'side', 'priority'=>'low');
return $boxes;
}