Support » Plugin: Custom Content Shortcode » If Taxonomy term custom field is set

  • studioavanti

    (@studioavanti)


    Hi,

    I have a Custom Taxonomy and an ACF field attached to the terms.
    I’m able to display this ACF field on a single post layout:

    <p>[taxonomy your-taxonomy-name field=your-field-name] static text</p>

    But if the post doesn’t have a term set, i’d like to hide the whole HTML markup.
    I tried this with no luck, the output is blank even on posts with a CT term and an ACF value:

    [if taxonomy your-taxonomy-name field=your-field-name]
        <p>[taxonomy your-taxonomy-name field=your-field-name] static text</p>

    [/if]`

    Thanks for your help.

  • The topic ‘If Taxonomy term custom field is set’ is closed to new replies.