Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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;
    }
    #1078270

    Hi 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.

    #1078464

    Hi,

    Thank you for pointing it out.
    We have asked our devs to check out.

    Best regards,
    Basilis

    #1078672

    Hi,

    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ünter

    #1078826

    Thanks Günter!

    I switched my old code with the one you just posted and everything is back to working properly!

    #1079078

    Hm, we don’t get it up and running?
    Any idea what could cause the trouble besides the right CPT name?

    #1079133

    Hi,

    @losting Glad it works for you now.

    @elbnetz
    If you are using the block editor and ALB you also have to enable REST API for your CPT.
    Check our portfolio registration in includes\admin\register-portfolio.php.

    Best regards,
    Günter

    #1079794
    This reply has been marked as private.
    #1079803

    Hi,

    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ünter

    #1079809

    Maybe I have to clarify: The ALB inside is possible.But the page outside is empty.

    #1079824

    Hi,

    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ünter

    #1079833

    Hi Günter,

    We will survive with version 4.5.2 until then ;-)

    Thanks!
    Thorsten

    #1079840

    Hi,

    Thank you.
    Enjoy the theme and feel free to come back if you need futher assistance.
    Have a nice day.

    Best regards,
    Günter

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Missing Adva Layout Builder in Custom Post Types after Updating to version 4.5.4’ is closed to new replies.