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

    I have a page that does only one thing: Displaying (the return value of) a shortcode.

    This shortcode (“[otherpost]”) reads user_metadata, calls a specific post-ID (from a custom post type OR a post), and displays this content as well as a form (that saves user_metadata). To display the content of this post, I do this ($contentid is the value I get from user_metadata and this is a valid post-ID):

    $content = apply_filters( 'avia_builder_precompile', get_post_meta( $contentid, '_aviaLayoutBuilderCleanData', true) );
     $content = apply_filters( 'the_content', $content );
     $content = apply_filters( 'avf_template_builder_content', $content);

    Here, I add my form-code (which is a super simple “POST” and is dealt with elsewhere).

    Then I return everything with do_shortcode( $content ).

    This worked nicely, until I updated Enfold to the newest version. Now, this code runs for a very long time and returns an empty page. The culprit – I have tried it out – starts with the precompile-filter. Returning simple form-data or other HTML directly is no problem at all.

    How could I make this shortcode work again?

    #1137348

    Hey BATO,

    Thank you for using Enfold.

    In the latest versions, the builder or the theme will not render shortcodes outside the builder or the widgets. You have to use the “avf_alb_exec_sc_only” to enable it back.

    // https://kriesi.at/support/topic/trouble-with-the_content-and-advanced-layout-editor/#post-1120443
    // https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/ALB%20Elements/General%20filters/avf_alb_exec_sc_only.php

    Best regards,
    Ismael

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