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 111 forks source link

Filter custom post types based on acf fields #291

Open ghost opened 5 years ago

ghost commented 5 years ago

In regular WP Rest API Call, /wp-json/wp/v2/pages?per_page=100&author=3 will return all the pages from author with id 3.

I have another posts type with a custom field, how can I filter all the posts with a specific field?

BrandonBlanchard commented 4 years ago

I too would appreciate some guidance here. It appears I'm not able to filter a custom Type "Articles" by any of the taxonomy fields. I would expect this to work like /wp-json/wp/v2/articles?categories=[some-category], but it appears this is not the case. Help?