• Resolved Thomas Cigolla

    (@tcigolla)


    Is it possible to use the custom taxonomy in an IF statement with field name and value in a Pods template?

    Animal is the custom taxonomy. There are values: cat and dog.

    Example:

    [if field=”animal” value=”dog” compare=”LIKE”]

    do something

    [else]

    do something

    [/if]

Viewing 1 replies (of 1 total)
  • Plugin Support Paul Clark

    (@pdclark)

    See https://docs.pods.io/displaying-pods/template-tags/if-conditional-tag/

    [if field="animal.slug" value="dog"]
    ~Woof~
    [/if]
    [if field="animal.slug" value="cat"]
    ~Meow~
    [/if]
    <a href="{@permalink}">{@post_title}</a>
    [if field="animal.slug" value="duck"]
    (This is a duck)
    [else]
    (This is not a duck)
    [/if]
    <br/>

    Please note all supported operations are listed on the documentation page. [if], as a template tag, does not allow complex programmatic operations or nesting of multiple [if] statements or additional shortcodes within [if]. For such complex logic, using PHP, or attaching a PHP function to a shortcode with add_shortcode() may be necessary.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.