I think i found the issue - i did change the Field ID from sale? to sale as i thought this could have been the issue with the field. That removed all the toggle states - so actually no toggle was set to “sale”
It now is working!
Hello,
i have a CPT setup with Metabos that includes a switch. I want to show a text inside a Query Loop when the switch is on (Metabox database:1). But i fail to do so.
I tried all possible conditions, but none worked. The Text itself does work when i set a false condition (but shows on all Elements.
That is the condition i use:
If i set it to != = “0” the text is shown, so the database value should not be 0. But == 1 nothing is shown.
Btw: i tried with Metabox Switch and checkbox - same behavior.
I can not figure out why and hope someone can help!
Thank you - i tried it all - “true” “checked” “yes” “1” - nothing works
What i do not understand is that it does show when i set the condition to != 1 - so i assume there IS something that gets pulled from the DB. I checked the DB table and it is “1” - so all i can think of that it pulls a wrong table or something
Hmm that’s weird. Could it be an issue of true being stored as number one and in the condition it checks against a string of 1 or the other way around? Maybe try adding a text field and see if you enter 1 and check against it if it works.
Just found this one, it’s for acf and a long ass thread but seems similar enough that it might help