Mark Zahra

Mark Zahra

Mark has been involved with WP RSS Aggregator for almost a decade, from running customer support to now leading RebelCode, the company behind the plugin. He has a passion for content and news, especially the concept of ethically sharing content to help each other grow.

Table of contents

RSS Tricks: How To Display Any RSS Feed On Your WordPress Blog

There are many plugins that allow you to display any RSS feed on your WordPress blog in one way or another, but did you know that WordPress itself has a built-in RSS reader?

That’s right, a couple of lines of code will add the WordPress function called wp_rss() to your blog which is nothing more than that built-in RSS reader.

The Fix

The code below can be added anywhere in your theme. The most suggested places however are the sidebar, the footer or the page template:

<?php include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('', 5); ?>

Once you’ve added the code above to the location of your choice, save it, and you’re done.

How It Works

What the code in question does is basically include the rss.php file from WordPress core.  What this file does is it allows you to use the wp_rss() function I mentioned earlier.

This function takes two parameters:

  1. The RSS feed’s URL – in this case
  2. The number of RSS entries you want to be displayed – in this case it’s 5 feed items.

You can change these to whatever RSS feed and value you’d like. It’s as simple as that.

Source: WP Recipes

Article by

Article by

Share the Post:

One Response

  1. hi
    This is prabhu. i’m a web developer and am working with wordpress. i just love working in wordpress. I came to know about RSS feed quite few months back . initially i dint know the use of RSS and later i came to know about its benefits. and your article about the how to display RSS on wordpress blog is really helpful and its easy to understand and work on it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles