• I had the [field excerpt] shortcode placed within a text area type ACF field named “cas_question” and until recently it worked just fine – when rendered in the front-end (again with shortcode) the ACF field [acf field=”cas_question”] would show the contents of the post excerpt.

    Recently, after the latest ACF plugin updates this setup stopped working. I believe this is due to ACF versions 5.11.1 and 5.11.2 after which calling the ACF shortcode on non-ACF options or post, user or term meta will return null, whereas before it might have returned the value. Explained in more details in their post here https://www.advancedcustomfields.com/resources/acf-field-functions/

    Please, any suggestions to fix this?

    Thank you!

Viewing 1 replies (of 1 total)
  • Thread Starter bsmolyanov

    (@bsmolyanov)

    I tried to resolve it with the following snippet (based on the example here: https://www.advancedcustomfields.com/resources/acf-format_value/). However no success so far.

    function my_acf_format_value( $value, $post_id, $field ) {
    
        // Render shortcodes in all textarea values.
        return do_shortcode( $value );
    }
    // Apply to textarea fields.
    add_filter('acf/format_value/type=textarea', 'my_acf_format_value', 10, 3);
    • This reply was modified 2 years, 10 months ago by bsmolyanov.
Viewing 1 replies (of 1 total)
  • The topic ‘[field excerpt] shortcode within an ACF field’ is closed to new replies.