0

So I have to interact with a large, seperate system on another server that is going to return, at the very least, post ids to my wordpress install in json format. And before others might ask why I'm getting post ids from a seperate system, it's because this system will eventually have all of our content and we are planning on only using WP for a year and then growing our own standalone. It's actually more complicated, but suffice it to say, it's pretty much set in stone that I will be getting post ids from an external application in json. So I have to figure out requesting things from the loop via incoming json.

I have the JSON API installed on my wordpress site. I can see how to expose a post in json format on my WP installation with query strings like:

http://mysite.com/?json=get_post&post_type=event&id=62

But what I really want is to expose the requested post in nicely formatted HTML from the WP loop. From what I've read so far, I'll need to add more filtering and fuctionality into functions.php. Or is this incorrect?

So really my question is: How would I pick the id from a json response coming from an external service and submit that against the Wordpress loop so I can see that event load in the middle column, all nicely formatted and stuff?

Do I need a custom controller or anything? I see post.php in controllers. But all those controllers seem to do is to return json. I'm working with the custom post type of "event" from the Event Manager plugin in this case.

EDIT: I am using just the JSON API. Not the Jetpack plugin. Should I be? It doesn't look like it....

  • 1
    Which JSON API? A custom function/page? The JSON API plugin? The Jetpack JSON API? – Brooke. Jul 2 '13 at 7:24
  • Sorry...just the JSON API. Not the Jetpack. I will edit my question accordingly. – yoyodyne Jul 2 '13 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.