I have another thread open for this but posting again for a solution that isn’t necessarily like the one I am having trouble with.
I have a new CPT - Research Papers. I can list them all on a page using template (added as a short code). The template features a Query Loop for that CPT. Easy.
I want to create another page that only lists Research Papers that have a ‘Highlight’ custom field set to True. I’ve tried creating this with Pods and ACF but had luck using a Conditions like this one:
I’ve checked and rechecked the value and tried other ways.
If I use a tag to achieve the same in the Query Loop it works, but I want to use a custom field.
Is this at all possible? Perhaps using a Meta Query?
Since it seems like you want to fetch a list of posts using a query loop a meta query should be your way to go.
Depending on the plugin you are using for your custom fields the value you are comparing to might have to be different. In my case I am using ACF and 1 works as expected. If you are having problems you could try to compare against true or True.
I too am struggling with this. I have a field that is basically “0 or 1”, or I set it as “Yes or No” and so on. I have tried comparing wit not setting, Equal, Numeric, CHAR - anything that would make sense for the character returned. I have tried pretty much all I can think of in reference to the image in the post above in this thread.
Wen it does work, I only get one post returned even though I have some that should and some that should not be returned.
I definitely want to use the value of a field for this query parameter and not some Category or Tag.
I have tested with more than one WordPress instance, trying a minimalist instance besides the current project. I have tested with Bricks 1.7.3 and 1.8 Beta 2