SOLVED: Element Conditions - Meta Box Switch

Bricks Version: 1.5.4

The MB Switch field is not showing in the dropdown list.

image

image

Hi Kyle,
Thanks so much for your report!

I was able to reproduce the issue and added it to our bug tracker.

Best regards,
timmse

I’ve also found this same issue. I’ve worked around it for now by changing the field type to checkbox.

Even so, I am not able to get element conditions to work consistently with conditions like ‘== 1’ or ‘!= 0’ or even using the ‘contains’ option etc. Is this a known bug too @timmse ?

CleanShot 2022-10-12 at 16.30.13@2x

Hi Kyle,
We’ve added the Metabox Switch Support in Bricks 1.5.5, now available as a one-click update within your WordPress Dashboard.

Please let us know if you are still experiencing issues.

@Gruntos Welcome to the forum! What type of field are we talking about?

Best regards,
timmse

I’m having an issue similar to the one Gruntos described. I can get the opposite of what I want to display, but not what I DO want to display.

Here are the details.

Hi Austin,
Have you tried setting the condition inside the loop (not on the loop item itself)? Does that make a difference?

I just tried that and the result was invisible versions of all the cards. They’re still clickable and everything, they just don’t display.

is there a way to write the query loop so it only displays posts where the toggle is on?

Hey,
You can use a meta query for this:

that worked! thank you