-
AuthorPosts
-
September 24, 2019 at 9:15 am #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,
PatrickSeptember 24, 2019 at 9:23 am #1141287So 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.September 24, 2019 at 9:28 am #1141290If the setting is “Load only used elements” the Enfold Image-Element returns ‘This element was disabled in your theme settings’.
September 24, 2019 at 9:46 am #1141297can 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.September 24, 2019 at 10:02 am #1141306It’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; }
September 24, 2019 at 10:17 pm #1141627if 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_typesyou 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.
September 25, 2019 at 8:45 am #1141690Well, 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 :)
September 26, 2019 at 3:09 pm #1142288Hi Resonanz,
Glad it’s working for you now! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.