Support

Account

Home Forums Front-end Issues Hide emtpy fields when using shortcodes

Helping

Hide emtpy fields when using shortcodes

  • Hi all,
    I am using shortcodes to display some fields in posts.
    Is there a way to hide emplty fields?
    I know it’s doable in the back end using php, but I can’t seem to find this functionality when shortcodes are involved.

    Any ideas?

  • There isn’t anything in ACF to not show content if the field is empty. For this you would need to write your own shortcode. There may be other tools available that can be used for this, but I cannot tell you what they are.

    A good tool for building custom shortcodes is the shortcode creator add on for shortcodes ultimate https://getshortcodes.com/add-ons/add-ons-bundle/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.