Connect with us

Tips & Tricks

How to: Display RSS feeds from anywhere

Here is a simple way to display any RSS feed in your WordPress blog.

<?php include_once(ABSPATH . WPINC . '/rss.php');
	$rss = fetch_rss('http://feeds2.feedburner.com/WPCult');
	$items = array_slice($rss->items, 0, 4);

		if (empty($items)) echo '<li>No items</li>';
		else
			foreach ( $items as $item ) : ?>
            <a style="font-size: 14px;" href='<?php echo $item['link']; ?>' title='<?php echo $item['title']; ?>'><?php echo $item['title']; ?></a><br /> 
            <p style="font-size: 10px; color: #aaa;"><?php echo date('F, j Y',strtotime($item['pubdate'])); ?></p>
            <p><?php echo substr($item['summary'],0,strpos($item['summary'], "This is a post from")); ?></p>
            <?php endforeach; ?>

The first step is to include the WordPress file rss.php then will apply code after to style the feeds.

Of coarse I forgot to mention, change the RSS feed to the feed you want to pull.

Random Search Terms

Title

Top Articles

Top Searches

powered by WassUp

Recent Posts: Fully Net Worth . com

Queen Key Net Worth: How Rich is the Rapper Actually?

Queen Key Net Worth: How Rich is the Rapper Actually?

Ke’Asha McClure, who is better known by her stage name as Queen Key is a rapper who made her breakthrough in 2016 with singles such as “Panic,” “Baked as a Pie,” and “Calling All Eaters.” She is known for her explicit songs and has recently released new projects called Eat My Pussy and Eat My […]

Puma from Black Ink Net Worth: How Rich is the Cast Member Actually?

Puma from Black Ink Net Worth: How Rich is the Cast Member Actually?

Paul Robinson, who is better known as Puma, is the owner of Art2Ink and had formerly been working as a Public Relations Manager of Black Ink which has a television series of the same name in VH1. As of 2019, Puma from Black Ink net worth is around $300,000. Puma was born on February 13, 1982 in […]

Xanman Net Worth: How Rich is the Upcoming Rapper Actually?

Xanman Net Worth: How Rich is the Upcoming Rapper Actually?

Haile Salaam, who is better known by his stage name as Xanman, is an upcoming American rapper who is best known among the rappers on the rise of DMV. He has released several hits including “PINK,” “Gucci Down” and “Hell Yeaa”. As of 2019, Rapper Xanman net worth is estimated to be $400,000. Salaam was […]