search
top

Displaying RSS Feeds in Wordpress from Another Website

RSS feeds have been becoming more useful everyday. One of it’s important usages is to embed some news or posts into your wordpress website. This could be useful if you have more than one wordpress website and/or you may want to display some latest news from a reliable source. To do this you need to provide the rss feed url to your codes.

What we should be doing here is to call the rss.php from the wordpress install in the first line of the code with<?php include_once(ABSPATH . WPINC . ‘/rss.php’); (the rss.php should already be there coming from a default wordpress install)

Then we give the RSS url of the feed we want to display in our wordpress website wp_rss(’http://ENTER-RSS-FEED-URL-HERE’, 10); ?> in the second line. The number written as “10” is the number of the feeds you want to display from the RSS feed url. It is optional and changable.

The final code should be two lines and look like:

<?php include_once(ABSPATH . WPINC . ‘/rss.php’);
wp_rss(’http://ENTER-RSS-FEED-URL-HERE’, 10); ?>

Leave a Reply

top