Test if Variable = XYZ
-
We’ve got a variable inside a repeater that is defined with one of several ACF fields depending on some other stuff. We need to test if that variable is equal to a specific ACF field (not its value, just the field name) but can’t seem to get the right shortcode figured out.
We’ve tried this…
[pass vars] [if {FIELDTOFETCH}=featured_image] <td>SHOW-IMAGE</td> [else] <td>[field {FIELDTOFETCH}]</td> [/if] [/pass]
And tried this, too:
[pass vars] [if pass='{FIELDTOFETCH}' value=featured_image] <td>SHOW-IMAGE</td> [else] <td>[field {FIELDTOFETCH}]</td> [/if] [/pass]
No joy.
Thanks,
MT
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Test if Variable = XYZ’ is closed to new replies.