Tagged: urgent
-
AuthorPosts
-
April 26, 2018 at 4:53 pm #947349
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’,’productoras‘,’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);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;
}Where do I have to add the custom post type so that the advanced editor works for me?
Thank you,
April 26, 2018 at 5:53 pm #947371Hello 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/
April 26, 2018 at 6:39 pm #947397Hi,
I’m glad you got this corrected. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘does not show the custom post type in this version 4.3 It is very urgent’ is closed to new replies.