I am using a plugin for WordPress called json-api, and it has a function to get recent posts. I am assuming its only called within the last 24 hours, but I wanted to modify it so I could give it a parameter to pull specifically by last 24 hours or 1 for days, then 2 for two days or 48 hours, ect…..
This is the plugin: https://wordpress.org/plugins/json-api/
I am able to modify the plugin if need too.
This is the function for that:
public function get_recent_posts_by_day() {
global $json_api;
$posts = $json_api->introspector->get_posts();
return $this->posts_result($posts);}
Here is an example link to the plugin for get_recent_posts
I have tried:
http://alexbachuk.com/api/get_recent_posts&after=20140806/
What I want to accomplish is either specifying a date and get all post from that date up until today.
Okay, I have got it to work with this: http://alexbachuk.com/api/get_recent_posts/?after=20150806&count=400
Fix: /api/get_recent_posts/?after=20150806&count=400