• I have an ACF number field which I am trying to compare with a variable. I think it is comparing alphabetically. How do I force a comparison as a number?

    [set number]123[/set]
    [pass vars]
    [loop type=counters field=quantity value={NUMBER} compare=>]
Viewing 1 replies (of 1 total)
  • try using this:

    [set number]123[/set]
    [pass vars]
    [loop type=”counters” field=”quantity” value={NUMBER} compare=”more”]
    [/pass]
    [/loop]

    If you don’t need to loop through other posts but are just comparing to values in the existing post –
    [set number]123[/set]
    [pass vars]
    [if field=”quantity” compare=”more” value={NUMBER}]
    Do something
    [/if]
    [/pass]

Viewing 1 replies (of 1 total)
  • The topic ‘Compare field as number’ is closed to new replies.