Include WordPress Posts in External Page

Posted on November 18, 2007

I needed to add the most recent blog posts to an external site and threw together this php script to do it. It’s pretty simple and easy to implement so I thought I would share. I don’t plan on supporting the script, so please don’t ask me how to add all sorts of other functionality. You’re welcome to take the script and customize it to your hearts content. Just grab the file, rename it to a .php extension, configure it with your database name, username, password and path and you’re set. Yes, you could pull in the RSS feed easily enough, but I thought I might eventually want to include the blogroll links or other data that wouldn’t be available in the feed so I did it this way. Everything is pretty well commented to make it easy to update.

Download the free script times


stumbleupon:Include WordPress Posts in External Page del.icio.us:Include WordPress Posts in External Page digg:Include WordPress Posts in External Page newsvine:Include WordPress Posts in External Page blinklist:Include WordPress Posts in External Page furl:Include WordPress Posts in External Page reddit:Include WordPress Posts in External Page fark:Include WordPress Posts in External Page blogmarks:Include WordPress Posts in External Page Y!:Include WordPress Posts in External Page magnolia:Include WordPress Posts in External Page

Comments

2 Comments so far - comments are now closed.
  1. on March 30, 2008    
    Pieter said:

    The posts are missing formatting, it’s just one block of text. Is there a way to fix this?

  2. on December 22, 2008    
    ernest said:

    That is a great piece of code. I would like to know how you could add categories. For example 3 seperate posting area with individual category