Forums

Feed for website? (2 posts)

  1. girrl
    Member
    Posted 4 years ago #

    I'm sort of new at this- but how do I create a RSS feed from my wordpress blog to my website? Basically I want my website to display the latest 3 posts from my wordpress blog. How can this be done? thanks~

  2. Aleister
    Member
    Posted 4 years ago #

    One option would be install a RSS aggregator script on your website, which would take the feed from your WordPress blog and display it. There are a lot of different ones out there. I have used one called Magpie in the past, which works very well:

    http://magpierss.sourceforge.net/

    It is fairly easy to set up and start using. Here is a very basic usage example:

    <?php
    require_once 'rss_fetch.inc';
    
    $url = 'http://yoursite.com/rss';
    $rss = fetch_rss($url);
    
    foreach ($rss->items as $item ) {
    	$title = $item[title];
    	$url   = $item[link];
    	echo "<a href=$url>$title</a>";
    }
    ?>

    It is also possible to do this with just a little custom code, as explained here: http://wordpress.org/support/topic/110780

Topic Closed

This topic has been closed to new replies.

About this Topic