How to post Wordpress RSS Feed into external website?

I previously had an RSS feed from one of my Wordpress blog categories appear on an outside website via an iframe. Here’s how I did it:

I created a PHP page inside the Wordpress blog’s site (inside the main Wordpress directory) called “newest.php” with the following code:


<div id="aboutus-right">
<?php $limit=3; $more=1; $count=1;

if (empty($wp)) {require_once('wp-config.php'); wp('cat=20&feed=rss2');}

if ($posts) { foreach ($posts as $post) { start_wp(); ?>

<img src="http://www.mywordpressblogsite.com/images/2GT-bullet.png" alt="-" width="16" height="16" align="left" hspace="6"><a href="<?php permalink_single_rss() ?>" target="_blank" title="PermaLink to <?php the_title_rss() ?> Article"><b><?php the_title_rss() ?></b></a>
<div style="font-size:10px; color:#CACFE3;"><?php the_time('l, F jS, Y') ?></div>
<div style="font-size:12px; color:#eeeeee;"><?php the_excerpt() ?></div>

<?php $count++; if ($count > $limit) { break; } } } ?>
<a href="http://www.mywordpressblogsite.com/?cat=20" target="_blank">Read More...</a>
</div>

I then called this “newest.php” page in an iframe on an external website.

Everything seemed to work perfectly fine, until WP version 3.8 came out. Now the newest.php page doesn’t display on info - it’s totally blank, and doesn’t grab any RSS info.

I’ve scoured the internet on what a fix might be. 99% of sites talk about adding an RSS feed to Wordpress, not the other way around. The few tip and tutorials on how to post a Wordpress RSS feed into external website are few and far between, and most are several (not a few) years old. Help! Does anyone have any ideas how to do this with the new Wordpress?

Can you use
http://your-site-path-to-blog/feed/ - all posts
http://your-site-path-to-blog/comments/feed/ - all comments

Yes, but that is the raw XML. I’m looking for a PHP solution that would grab the feed content, and spit it out in HTML format. AND for a specific category within Wordpress.

This would need two things.

Create another feed template http://codex.wordpress.org/Customizing_Feeds
Use PHP to parse the feed. A lot to choose from, eg. MagpieRSS, [URL=“http://simplepie.org/”]SimplePie, [URL=“http://rssphp.net/”]RSS_PHP, [URL=“http://pear.php.net/package/XML_RSS/redirected”]XML_RSS or “roll your own” using PHP core functions