Metabox, Query Loop and Excluding according to a value in the custom field

How do I list all posts but exclude posts that have a certain value in one of the custom fields?

You can create the loop with the posts and add a Meta query and in Compare select Not equal.

Is that what you meant?

image

Marcosvl,

Almost! Where do I put the value I want to compare to?

I have a set of three radio buttons and I want to not show the post in the loop if the state of the three buttons is NOT only one of the three possibilities.

It’s likely plainly there but I am missing it.

If you have any ideas I would very much appreciate it.

Thanks

Oh I think I have it sorted!

I really appreciate you making it so much more clear. I just need to make sure it does not match the state of the radio button I don’t what to show. I use a literal, not a variable.

Thanks again.

Did you make it? I don’t fully understand what you want to do.

You have 3 radio buttons
Choice 1 - Choice 2 - Choice 3
If you are using the MetaBox plugin you can only choose one of them
image
What you want is that if one of the buttons is selected it is not displayed in the post? In that case as you mention it would be better to use a literal and not the variable

That’s how I’m doing it now yes.