1

I have created some custom taxonomy and am utilizing WP's REST API v2. I am able to call posts with a specific taxonomy id like so:

http://example.com/wp-json/wp/v2/posts?custom_taxonomy=14

This works great to retrieve all posts with this category. My question is how to EXCLUDE all posts with this category. I know the api supports the categories_exclude parameter, but how can I do the same for a custom taxonomy?

1 Answers1

1

Solved it. Wasn’t an issue with the api it was an issue with the custom endpoint I developed for it.

In case anyone had the same question, adding “_exclude” to the end works:

http://example.com/wp-json/wp/v2/posts?custom_taxonomy=14