• Back again with an issue ??

    I’m having trouble getting IF statement to work with an ACF field that is in an option page. [if field=field_name option=true] does not seem supported?

    I also can’t make an IF statement work in a relationship field that is an option field, even though the related field I try to look for is not in an option page. Example

    [related related_field option=true count=3]
    [if field=field_name value=1]
    True
    [/if]
    [/related]

    That does not work. I tried adding option=false to the IF statement as well, no luck

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try:

    [if field=field_name value='1' option=true]

    If it does not work – use a var.

    [set myvar][field field_name option=true][/set]
    [if var=myvar value='1']
    Do what you want
    [/if]
    Thread Starter finnfin

    (@finnfin)

    Of course! var to the rescue whenever there’s an issue. First one didn’t work, second did. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ACF Option=true’ is closed to new replies.