0

I am looking at the WordPress JSON API Plugin. What I'd like to do is query all posts in a custom taxonomy term called wales. I have been able to get all posts in the post type listings using this url -

/?json=get_posts&post_type=listings

But how would I retrieve all posts in a custom taxonomy term?

I have attempted this -

http://scd.blaze.wpengine.com/?json=get_posts&taxonomy=area&term=wales&post_type=listings
4
  • Before someone else gets here, I should remind you that plugin specific questions aren't great round these parts... Also, WP 4.4 includes a JSON API in core now. v2.wp-api.org If you can't find something you need you can create custom endpoints - v2.wp-api.org/extending/adding
    – jgraup
    Dec 10, 2015 at 16:29
  • On a side note, WPEngine was hacked today so be sure to change all your passwords - wpengine.com/support/infosec
    – jgraup
    Dec 10, 2015 at 16:34
  • 1
    Check out scd.blaze.wpengine.com/wp-json to see where your endpoints start.
    – jgraup
    Dec 10, 2015 at 16:37
  • Thats great, thank you for your suggestions. I have heard about the hack but thank you for the reminder. I will check out your suggestions
    – Lucy Brown
    Dec 11, 2015 at 9:04

1 Answer 1

0

I found this this url got me the results I needed -

http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=channel

my post type being listings and the slug of my term channel

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.