Simple filter based on a custom field

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.

CleanShot 2023-02-28 at 10.51.35

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.

2 Likes