Posted: November 21, 2015 at 8:49 am
I’m trying to figure out the JSON REST stuff and when I try to learn something, I find it’s best to have a project goal. FYI, I’ve installed WP JSON REST plugin and EE JSON REST addon and also the CLIENT addon from the Github. I’ve got it working and am trying to modify it for my own (and client’s) needs. The template currently has: I want it to have something like:
</article> And of course, I want it to loop through the categories and then loop through the events in each category. THANKS! |
|
I’m getting closer. I’ve found this: But I’m still trying to find out how to reference that. |
|
I’m also finding that when my JSON data is from: But when I get JSON data from: |
|
Hi Brandon, You can get a list of EE event categories (or terms) with this: /wp-json/taxonomies/espresso_event_categories/terms There’s a lot of good information here: Once you have your list of EE event category terms, you can get a filtered list of events by event category with this: /wp-json/ee/v4.6/events/?filter[where][Term_Taxonomy.Term.slug]=your-category-slug&include=EVT_name More info here:
|
|
Perfect! Thanks! |
|
One correction to your JSON URL above: needs brackets: /wp-json/ee/v4.6/events/?filter[where][Term_Taxonomy.Term.slug]=classes-for-teens&include=EVT_name |
|
Fixed. We can thank bbPress for stripping those out. |
|
The support post ‘EE4 JSON REST categories question’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.