2

I'm trying to get posts from a custom taxonomy term in a custom post type but it is just displaying all the posts in the custom post type.

I've tried using Filter in my endpoint url but I have a feeling this is no longer possible. This is what I've got.

http://www.example.net/wp-json/wp/v2/directory/?filter[directory_type]=exhibitor-directory

This is my first outing with Rest API so sorry if I'm missing something obvious.

1

So it turns out in WP 4.7 the Filter argument for any post endpoint was removed. You can add it but installing this plugin on the site that you are trying to get posts from.

https://github.com/WP-API/rest-filter

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.