Hello, I am using the JSON API plugin on my buddypress site (https://wordpress.org/plugins/json-api/)
With this I can create a feed of latest posts using the url http://www.mysite.com/api/get_recent_posts/
I would like to create a feed of my latest events. I am using the WP Event Organiser plugin (http://wp-event-organiser.com/) I believe this uses the custom post type 'event'.
Can anyone help with the url I would need to visit to see a json feed of my events.
Thank you
Bob answers:
Please try this
[[LINK href="http://www.betheplayer.com/api/get_recent_posts/?post_type=event"]]http://www.betheplayer.com/api/get_recent_posts/?post_type=event[[/LINK]]
http://www.betheplayer.com/api/get_recent_posts/?post_type=event
Francisco Javier Carazo Gil answers:
Ross,
Good morning, if I were you, I would create a page template and I would do the queries over the events (it should be CPT) and then create directly or composing strings, this result.
Arnav Joy answers:
Hello Ross ,
So using this feed , you want to insert the data to the events in admin ? or you want to display the data in a new page using this feed ?
Please explain .
-Arnav
timDesain Nanang answers:
Hi Sir,
Try this:
[[LINK href="http://betheplayer.com/?json=get_recent_posts&post_type=event"]]http://betheplayer.com/?json=get_recent_posts&post_type=event[[/LINK]]
[[LINK href="http://betheplayer.com/?json=get_recent_posts&post_type=event&count=5"]]http://betheplayer.com/?json=get_recent_posts&post_type=event&count=5[[/LINK]]
[[LINK href="http://betheplayer.com/?json=get_recent_posts&post_type=event&count=5&page=1"]]http://betheplayer.com/?json=get_recent_posts&post_type=event&count=5&page=1[[/LINK]]
info: https://wordpress.org/plugins/json-api/other_notes/#Method:-get_recent_posts