-
AuthorPosts
-
March 11, 2019 at 9:47 pm #1077501
Hi! We got the Enfold running on a clients site that uses custom post types and used the below code in the function.php of the Child theme to get the Advanced layout builder with no issues… until updating to 4.5.4 and WP version 5.1
Everything that was previously done in Advanced Layout Builder is fine, and I can edit those posts with the ALB… New posts no longer have the “Advanced Layout Builder” button up near the “Publish” button.
Any ideas where to start, or has there been a change that effects the code we used:
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'][] = 'show'; /*instead add the name of the custom post type here*/ } } return $metabox; }
March 13, 2019 at 1:46 pm #1078270Hi There,
We can confirm, that this code doesn’t work after updating to 4.5.4 anymore.We are using:
function custom_post_types_options($boxes) { $boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('portfolio','page','post','epaper','product'), 'context'=>'normal', 'expandable'=>true ); $boxes[] = array( 'title' =>__('Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('portfolio','page','post','epaper','product'), 'context'=>'side', 'priority'=>'low'); return $boxes; }
Will this be corrected within next update? Is there an interims solution?
Thanks,
T.March 14, 2019 at 12:44 am #1078464Hi,
Thank you for pointing it out.
We have asked our devs to check out.Best regards,
BasilisMarch 14, 2019 at 12:40 pm #1078672Hi,
Since 4.3 there is a filter to add your custom post types to be recognised by ALB:
function my_alb_supported_post_types( array $supported_post_types ) { $supported_post_types[] = 'your_custom_post_type_1'; $supported_post_types[] = 'your_custom_post_type_2'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'my_alb_supported_post_types', 10, 1);
And I added a filter avf_metabox_layout_post_types for the next release – same usage as avf_alb_supported_post_types.
Best regards,
GünterMarch 14, 2019 at 7:44 pm #1078826Thanks Günter!
I switched my old code with the one you just posted and everything is back to working properly!
March 15, 2019 at 11:46 am #1079078Hm, we don’t get it up and running?
Any idea what could cause the trouble besides the right CPT name?March 15, 2019 at 2:15 pm #1079133March 18, 2019 at 10:21 am #1079794This reply has been marked as private.March 18, 2019 at 10:49 am #1079803Hi,
If I paste this code in my functions.php in backend I can create a new post of this post type and I have the ALB button available. I do not have any taxonomies – check enfold\includes\admin\register-portfolio.php how we did it.
Did you remove your other customizations?
Can you try it on a clean WP install test site please? And check for a possible plugin conflict by deactivating all plugins.
Best regards,
GünterMarch 18, 2019 at 10:55 am #1079809Maybe I have to clarify: The ALB inside is possible.But the page outside is empty.
March 18, 2019 at 11:18 am #1079824Hi,
Sorry – I thought you had the troubles in backend.
There is a bug in 4.5.4 with ALB and custom post types in frontend. This should be fixed in the next release – which we are planning very soon.
Can you wait for that? If not, please open a new thread, add the link here, give me ftp access to your server and I will upload a working zip version in the WP uploads folder which you can install whenever you want.Best regards,
GünterMarch 18, 2019 at 11:35 am #1079833Hi Günter,
We will survive with version 4.5.2 until then ;-)
Thanks!
ThorstenMarch 18, 2019 at 11:59 am #1079840 -
AuthorPosts
- The topic ‘Missing Adva Layout Builder in Custom Post Types after Updating to version 4.5.4’ is closed to new replies.