Getting a list of the recent posts

Using the metaWeblog.getRecentPosts API you can retrieve a list of the recent posts. In the following example a variable $limit will be expected in order to constrain the number or results.

query('metaWeblog.getRecentPosts', BLOG_ID, RPC_USERNAME, RPC_PASSWORD, LIMIT);
$posts = $client->getResponse();

echo json_encode($posts);
?>

Leave a Reply