Support » Plugin: WP REST API (WP API) » WP REST API v2 – exclude custom taxonomy

  • 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?

Viewing 1 replies (of 1 total)
  • Thread Starter mnpalazzo

    (@mnpalazzo)

    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

    • This reply was modified 3 years, 5 months ago by mnpalazzo.
Viewing 1 replies (of 1 total)
  • The topic ‘WP REST API v2 – exclude custom taxonomy’ is closed to new replies.