• Resolved oneill78

    (@oneill78)


    Hello,
    I want to create a table with 4 <td> and display the result in column 1 if the value entered is “beginner”, in column 2 if the value of the field is “junior, etc.”
    How can I do with the template pods [IF] [/ IF]?
    [if level == ‘junior’] {@level} [/ if] does not seem to work.

    Thank you in advance for your help.

    Lionel

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    The IF Template Tag does not support conditional matches. It only checks to see if there is a value in the field.

    You cannot do this with the Pods Templates; you’d need to use PHP.

    Plugin Contributor Jim True

    (@jimtrue)

    Or just use the actual value ‘beginner’ as your field for ‘level’. The goal is to design your data so it stores what you need. If Level is a Taxonomy, you can add a field to ‘level’ that could store your additional ‘value’ needs like ‘Beginner’ instead of ‘Junior’.

    Thread Starter oneill78

    (@oneill78)

    Thank you Jim.

    I use DIVI template with a child theme.
    My pods is called “evaluation” and I want to display the results in a single page template.
    Do I have to create an “evaluation.php” page in my child theme (or single-evaluation.php) ?
    is there a simple template for building this page and I can insert my table with my 4 <td> ?
    I know php but not yet very well the functions of wordpress or that of pods. I looked at the documentation but I do not know what to choose.

    Thank you in advance for your help.

    Plugin Contributor Jim True

    (@jimtrue)

    Use the Template Hierarchy for reference:
    https://wphierarchy.com/

    It’s never named the same as the post-type, it’s always single-<post-type>.php or archive-<post-type>.php

    You have to recreate your html in the PHP. That’s not a WordPress function, that’s just PHP output.

    Each loop through is a row.

    Thread Starter oneill78

    (@oneill78)

    Thank you Jim for you help,

    I was able to create the single-evaluation.php file and create the html and php directly in my child theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[if] [/if] with result value ?’ is closed to new replies.