Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #946472

    Hello

    After the update to the new version I can not add the custom post types .. since the code a a changed

    With respect to the previous one ..

    Code before the Change

    $boxes = array(
    	
        array( 'title' =>$av_default_title, 'id'=>'avia_builder', 'page'=>array('post','portfolio','page','product','<strong>productoras</strong>','actor','peliculas'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true ),
    	array( 'title' =>__('Enfold Shortcode Parser','avia_framework' ), 'id'=>'avia_sc_parser', 'page'=>array('post','portfolio','page','product','productoras','actor','peliculas'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>false ),
        array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page' , 'post','productoras','actor','peliculas'), 'context'=>'side', 'priority'=>'low'),
        array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio'), 'context'=>'normal', 'priority'=>'high' ),
        array( 'title' =>__('Breadcrumb Hierarchy','avia_framework' ), 'id'=>'hierarchy', 'page'=>array('portfolio'), 'context'=>'side', 'priority'=>'low'),
    );
    
    /**
     * used_by:		enfold\config-woocommerce\admin-options.php  avia_woocommerce_product_options()			10
     */
    $boxes = apply_filters('avf_builder_boxes', $boxes);

    Code after the Change

    $boxes = array(
    	
        array( 'title' =>$av_default_title, 'id'=>'avia_builder', 'page'=> Avia_Builder()->get_supported_post_types(), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true ),
    	array( 'title' =>__('Enfold Shortcode Parser','avia_framework' ), 'id'=>'avia_sc_parser', 'page'=> Avia_Builder()->get_supported_post_types(), 'context'=>'normal', 'priority'=>'high', 'expandable'=>false ),
        array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio', 'page' , 'post'), 'context'=>'side', 'priority'=>'low'),
        array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio'), 'context'=>'normal', 'priority'=>'high' ),
        array( 'title' =>__('Breadcrumb Hierarchy','avia_framework' ), 'id'=>'hierarchy', 'page'=>array('portfolio'), 'context'=>'side', 'priority'=>'low'),
    );
    
    /**
     * used_by:		enfold\config-woocommerce\admin-options.php  avia_woocommerce_product_options()			10
     */
    $boxes = apply_filters('avf_builder_boxes', $boxes);

    Where do I have to add the custom post type so that the advanced editor works for me?

    Thank you,

    • This topic was modified 6 years, 1 month ago by Rafa.O.
    #946517

    I have added this code added to the son in functions .php and along with the modification of the previous lines it worked for me

    /* Añadir Entradas Personalizadas a WordPress*/ 
    
    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'][] = 'productoras,actor,peliculas'; /*instead add the name of the custom post type here*/
    		}
    	}
    	
    
    	return $metabox;
    }
    • This reply was modified 6 years, 1 month ago by Rafa.O.
    #946822

    it is very urgent

    #947351

    it is very urgent….it is very urgent.

    #947372

    Hello good afternoon

    I think it’s solved with this .. post .. Thank you for your time ..

    You can close case .. Thank you very much ..

    https://kriesi.at/support/topic/adding-the-avia-layout-builder-to-custom-post-types/

    #947600

    Hi,

    Sorry for the late reply, glad you found a solution and thanks for the feedback. I’ll close this thread for now, please open a new thread if you should have any further problems or questions.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘does not show the custom post type in this version 4.3 It is very urgent’ is closed to new replies.