How to pull “most recent post” data from a WordPress blog?

I have two WordPress blogs. I want to pull the “5 most recent posts” from the first blog with post title, date, and link to post and display this data on the other. I don’t know if there is a plugin that does this sort of thing already, but just wondering how I can achieve this.

Related posts

Leave a Reply

3 comments

  1. What you need to use here is an RSS from the first blog and display it using a plugin or something you’d code yourself on the 2nd blog. The reasons for this approach are:

    • simplicity of implementation
    • security – functions that pull data from the database in blog 1 are not available to blog 2 (db settings, etc). I’m not sure if wordpress provides some sort of an oAuth API yet to pull this data in a secure way

    Something like KB Advanced RSS Widget should do for your case.

  2. This also somewhat depends on where you want the posts from “Blog 2” to display on “Blog 1”. For instance, if you want them to display in the sidebar and your theme supports widgets, then WordPress has a built-in RSS widget. You just need to give it the RSS feed for Blog 2. That would probably be the simplest implementation.

    Otherwise a plugin of some sort to grab the feed would probably work well, as Artem suggested.