Enfold Wissensdatenbank

Make CPT visible in Post Slider/Post Grid

add_theme_support( 'add_avia_builder_post_type_option' );
add_theme_support( 'avia_template_builder_custom_post_type_grid' );


Force CPT to use Enfold Editor

function avf_alb_supported_post_types_mod( array $supported_post_types )
{
  $supported_post_types[] = 'fahrzeuge';
  return $supported_post_types;
}
add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);

Old Version Force CPT to use Enfold Editor but works better

add_filter('avf_builder_boxes','yanco_enable_cpt_layout_builder', 20, 1);
function yanco_enable_cpt_layout_builder( $boxes ) {
	$boxes = array();

	$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('post','portfolio','page','fahrzeuge'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true );
    $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page' , 'post', 'fahrzeuge'), '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;
}

Write Errors in new File

function my_acf_fields_post_object_query( $args, $field, $post_id ) { 
// Restrict results to children of the current post only.
		$fields_str = print_r( $args, true );

 // Define the path to the log file within your website's directory
   		 $log_file = __DIR__ . '/log.txt';

 // Log the contents of the fields array to the log file
   		 file_put_contents( $log_file, 'Fields array: ' . $fields_str . PHP_EOL, FILE_APPEND );
}