Support

Account

Home Forums General Issues Shortcode: Using the Hide if empty in a shortcode Reply To: Shortcode: Using the Hide if empty in a shortcode

  • Two other options that would be awesome is to add html wrapper and class

    [acf field="field_name" post_id="options" hide_empty="1" html_tag="div" class="my-class"]

    This would output

    <div class="my-class">Field Value</div>

    If no value then output nothing.

    If class exists but not html tag then default to <span>

    This would be really awesome as options to the ACF standard shortcode.