Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #967597

    Long story short; we have a custom function that allows us to create ‘Global content blocks’ as a custom post type and use Enfold hooks to inject Advanced Layout Builder content on all pages.

    The issue I’m having is that elements on the page loaded using our custom functionality aren’t recognised as ‘in use’ when selecting ‘Load only used elements’ in Performance. In one particular scenario we are using a fullwidth sub menu and the ‘below footer columns’ hook to change the style of the footer menu. The fullwidth sub menu is being replaced by a warning to enable the element assets in Performance settings.

    Question: Is there some code we can use to force a particular element’s assets to be loaded using PHP, while still using ‘Load only used elements’? Or even better, is there a way we can integrate our custom code to have all the elements used recognised?

    We are using this code (as part of a larger function) to retrieve the Layout Builder content for a post, them simply echoing the retrieved HTML;

    $go_sectionContent = apply_filters(‘avia_builder_precompile’, get_post_meta($post_id, ‘_aviaLayoutBuilderCleanData’, true));
    $go_sectionContent = apply_filters(‘the_content’, $go_sectionContent);
    $go_sectionContent = apply_filters(‘avf_template_builder_content’, $go_sectionContent);

    • This topic was modified 6 years, 6 months ago by gocreative.
    #969838

    Hey Grant,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

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