airesvsg / acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API
https://wordpress.org/plugins/acf-to-rest-api/
1.33k stars 110 forks source link

How to query by ACF fields in the posts endpoint #387

Open db654 opened 3 years ago

db654 commented 3 years ago

Added a simple checkbox field called restrict_to with a few values in ACF. I used this plugin to bring that field into the posts API which worked great but I can't seem to find any way to filter post results by the custom field value. Would be great if there was a way to use the custom field to include or exclude posts with certain values from the response. Is this possible?