[IF] conditions with ACF repeater fields
-
I am trying to use the
[if]
shortcode to check if a repeater sub field is filled, and if so display data from another repeater sub field.This is my repeater field along with sub fields:
https://take.ms/TabcsAnd this is my code in it’s current form:
[loop type="afdeling" id="3160"] Mandag [if repeater field="monday" sub="closed" value=""]Lukket[else][repeater field="monday" sub="from"] - [repeater field="monday" sub="to"][/if] [/loop]
Should that not work?
I want to display the text “Lukket” if the sub-field “closed” is
TRUE
, and the value from sub-field “from” and “to” if sub-field “closed” isFALSE
.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[IF] conditions with ACF repeater fields’ is closed to new replies.