Conditions Seem Backwards and Seem to Change Randomly

I have a CPT that includes a text field for a Photo Description. It has a default text of ‘None’ when I add it to my Single Post Template it seems to function in reverse as shown in this Loom video.

If the condition satisfied it should show, and it the condition is not met then it should not be seen. The video shows the exact opposite.

What’s more frustrating is that this condition seems to change sometimes if I add other conditional fields to the template. It also seem to occasionally be different on the live site, or if I call up a different CPT entry vs the one I’m using as the displayed one in the editor.

I’m ready to tear my hair out since it works fine and then it will do the opposite of what I expect.

Hello @dabigcheeze,

Thanks for writing in!

The condition is working as expected. The Text element will only display when the condition is TRUE. For example:

{{dc:acf:post_field field="my-field"}} IS "None"

This condition will be true if;

  • the value of my-field is equal to “None”

So if the default value of my-field is “None”, the Text element will always display. As soon as you input a new value, the condition will no longer be true. Hence, the Text element is hidden away. I would suggest that you do the opposite condition instead.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.