Jump to content

How to include a wordpress rss feed on another website


sarina28

Recommended Posts

i have searched everywhere on how to include a wordpress feed on a website. I designed a website and a blog for a friend, but the blog his hosted on wordpress's server. I found some info about doing it if you host the blog on the same server as the website. I want to be able include the latest post within the website content div. The website already contains some php includes. I found out how to include a Twitter feed, and got it ot work, but want the feed from wordpress. Is this possible to do?

 

Thanks for your help.

Link to comment
Share on other sites

I wrote a two part PHP/jQuery video tutorial on this that's available in the "Misc PHP" section of KillerSites University (http://www.killersites.com/university/ - subscription required). It covers grabbing an RSS feed (in this case, recent posts from a forum) using PHP and jQuery and displaying them.

 

You should be able to do something similar using PHP to grab the RSS feed of the Wordpress blog. Specifically, you might want to look at PHP's SimpleXML function to parse the XML feed and grab and display the data you need. In addition to my tutorial, here are some links on the subject:

http://php.net/manual/en/book.simplexml.php

http://www.w3schools.com/PHP/php_xml_simplexml.asp

http://www.devshed.com/c/a/PHP/Introducing-SimpleXML-in-PHP-5/

Link to comment
Share on other sites

Thanks for the info. I found a solution to suit the needs of this site. I've installed SimplePie. It works great, and easy to modify. I'm slowly learning php. I've been using includes with success. I have taken a php and sql class, but the instructor was to confusing. I want to try the killer php tutorials next.

 

Here it is in use on a test page. I use this page to test out and modify elements.

 

www.mustangsandmotorsports.com/nav.php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...