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?