Convert any RSS to HTML

RSS feeds are a great way of not only promoting your own online content, but also of leveraging that of other independent publishers for syndication purposes. Sooner or later you are going to want to make the news from your RSS feeds accessible to a broader audience, whether you want to aggregate and filter the latest news in your particular tightly-focused niche, or bring fresh traffic to your website by allowing others to do the same. RSS To HTML services allow you to easily publish these news feeds directly to your web site, just like any other content. Adding this to your wordpress theme will convert any RSS feed into HTML to display in your wordpress theme.




$rss = fetch_feed('');
$maxitems = $rss->get_item_quantity(5);
$rss_items = $rss->get_items(0, $maxitems);
<?php if ($maxitems == 0) echo '<li>No items.</li>';
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
<a href='<?php echo $item->get_permalink(); ?>' title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'><?php echo $item->get_title(); ?></a>
<?php endforeach; ?>

Leave a comment