Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


BlogReader App Tutorial Question

How can one pull blog post by categories using JSON instead of get_recent_posts. I tried get_recent_categories up to no avail. I am also using WordPress and theJSON API Plugin. Hope to hear from you soon. thanks

1 Answer

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Take a look at the documentation for the JSON API and you will notice that there are two methods related to categories:

  • get_category_posts: Returns an array of posts/pages in a specific category.
  • get_category_index: Returns an array of active categories.