Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1141279

    Hi,

    I have a CPT and activated ALB for that PT. Now I get an error Message for the Image-Element ‘This element was disabled in your theme settings’. Further more the information is ‘You can activate it here: Footer Einstellungen’. So the translation is also wrong :)

    If I activate ‘Load all elements’ it’s working but that’s not what I want. Whats the issue here?

    Best,
    Patrick

    #1141287

    So what do you like to have on that performance settings: “Load only used elements”
    Thats what i have there. And have never Troubles on that images.

    #1141290

    If the setting is “Load only used elements” the Enfold Image-Element returns ‘This element was disabled in your theme settings’.

    #1141297

    can you please create a new post and place an image alb there.
    Afterwards check if you can use then the Image ALB on your CPT
    How did you activate for your custom post type the ALB Usage – maybe there is the point of interest.

    #1141306

    It’s working on a page but not on the CPT.

    That’s the code how I activated ALB for the CPT:

    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'][] = 'projekt'; 
            }
        }
        return $metabox;
    }
    
    #1141627

    if you are not on Enfold older than 4.3 afaik that filter is deprecated : avf_builder_boxes
    the new filter is : avf_alb_supported_post_types
    and for metabox: avf_metabox_layout_post_types

    you can read here how to: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type

    so try this instead:

    // For Activation ALB for CPT
    function avf_alb_supported_post_types_mod( array $supported_post_types )
    {
      $supported_post_types[] = 'projekt';
      return $supported_post_types;
    }
    add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
    
    // For layout meta box
    function avf_metabox_layout_post_types_mod( array $supported_post_types )
    {
     $supported_post_types[] = 'projekt';
     return $supported_post_types;
    }
    add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
    • This reply was modified 5 years, 2 months ago by Guenni007.
    #1141690

    Well, today the problem was gone by itself :S

    But I updated the code anyways, thank you. I will get back if the problem returns.

    Have a nice day :)

    #1142288

    Hi Resonanz,

    Glad it’s working for you now! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.