How to create an RSS Feed in WordPress

Overview: Create RSS Feed in WordPress

WordPress comes with default RSS feeds built into the website builder. WordPress can generate feeds for all your website posts as well as corresponding comments on default. WordPress has vast plugins that make it easy to create new RSS feeds as well as modify existing ones. The default feeds which are added to website pages tend to be enough for most people; however, you can customize the feeds accordingly. 

Creating custom WordPress RSS feeds

If you are interested in creating custom WordPress RSS feeds from scratch; you’ll need to move beyond the beginner WordPress user level. Before you get started, create a complete site backup to avoid losing critical site data.

To get started, create a new feed in your theme’s “functions.php” file. Alternatively, you can do this in a site-specific plug-in. To trigger the custom RSS function which adds a new feed, use the code below;

After adding a new feed, you must create a callback function to generate the required feed. Use the code displayed below in your theme’s “functions.php” file or site-specific plug-in. 

The purpose of the code above is linking to a separate template file via the get_template_part function – keeping functionality separate from the layout. The code can also be used directly. The get_template_part has a slug and name argument that simply “tells” WordPress to look for specific file templates. 

It is advisable to define the slug to correspond to the type of feed being created – RSS in this case. The name should match the feed name configured earlier. After “telling” WordPress to search for the feed template, you can proceed and create it using the code below;

The above code will generate a custom WordPress RSS feed that can be amended as you wish to display any kind of information required from comments to post images. The post count variable in the code allows you to control the no. of posts displayed in your feed. The excerpt_rss function displays excerpts for every post. Posts without excerpts will show the first 120-words of content.

Displaying the WordPress RSS feed

To display your new custom feed, you should proceed and flush WordPress rewrite rules. To do this, login to WordPress admin then click on permalinks under settings. Proceed and save the changes to flush the rewrite rules. 

Your custom RSS feed can be accessed by visiting: yourdomain.com/feed/feedname. Your feedname is the name given to your add_feed function.

RSS feed plugin: An easier alternative to creating custom WordPress RSS feeds

The above guide on creating a custom RSS feed in WordPress can be complicated to a person with beginner WordPress knowledge. If that sounds like you, installing an RSS feed plugin is a better option.

WordPress RSS Feed Retriever is a great alternative to customizing WordPress RSS feeds from scratch. The plugin fetches a feed/s and displays them using a short code. Simply; copy and paste, replace the URL among other properties, as you wish.

Installing the WordPress RSS Feed Retriever is easy. Simply download the zip file to your WordPress directory plugins, unzip the file and activate the plugin via your WordPress plugins menu. Proceed by using example codes anywhere in your website content. You can change the URL among other properties as you wish.

Benefits of using an RSS feed plugin to create an RSS feed in WordPress

The RSS Feed Retriever has notable benefits that include, but aren’t limited to; easy setup and unmatched control on display. You can control how you display feed content, i.e. as an excerpt or entirely. You can control excerpt word count, add a “read more” link and display feeds as you wish using a short code including text widgets. 

There are no limits to the number of feeds when using the RSS Feed Retriever. Other notable benefits revolve around simplicity and speed when creating feeds. You can also control item order, put multiple feeds in one list, set cache time and much more!

This RSS feed plugin is also lightweight which ensures your website speed remains optimal. You can use the RSS feed retriever to create custom news aggregators. The plugin can also be used to create and post RSS parsing feeds on any site page/s you choose.

Quick Guide to RSS Feeds

Introduction to RSS feeds

RSS feeds have revolutionized the way we interact with online content. RSS which stands for Rich Site Summary or Really Simple Syndication has made it easy to browse a vast web. Instead of repeatedly checking different sites for updates or new content, RSS feeds offer you automatic updates.

How RSS feeds work

RSS feeds are simply text files which feed directories allowing subscribers to see content immediately it is published or updated. Content can be viewed even more easily using an RSS feed reader or RSS aggregator which is a simpler way of viewing all your RSS feeds at once using one interface.

Getting started

Although some websites don’t publish an RSS feed, most do. To set up a personal feed, follow the steps below;

Step 1: Download an RSS reader or RSS aggregator: There are many free and commercial RSS readers, apps and extensions available online. Download any of these on your mobile device or computer.

Step 2: Visit your favorite sites and search for an RSS link. In case you don’t find one, search the name of your favorite website on Google and include the word RSS. Doing this should bring you an RSS link if one exists.

Step 3: Copy and paste the RSS link of your favorite website on your RSS reader. Repeat for all your favorite websites.

Important: Some RSS aggregators are designed to offer suggestions of related sites that have feeds available. To use your RSS reader, login to the webpage of the respective reader or run the reader software or app. This should allow you to scan the feeds of websites you love visiting instantly. You can make customizations such as arranging feeds into different folders, just like emails. You can also set alerts to get instant updates when specific web feeds are updated.

RSS Aggregator
RSS Aggregator

Custom RSS feeds have sites of your choice delivering the latest directly on your screen. Instead of visiting multiple sites to view the latest in sports, weather, gossip, politics, etc., your just need to visit your RSS aggregator and see the latest in all those sites displayed on one window.

Types of RSS readers

  1. Web-based RSS feed readers: These types of readers allow website visitors to read feeds via a website browser. Web-based readers are the most convenient to use. They are also easy to setup. Feedly is a good example of a web-based reader.
  2. Built-in browser feed readers: The main browsers in use today have built-in RSS readers with countless plug-ins and extensions offering unmatched functionality.
  3. Desktop readers: These types of RSS aggregators are recommendable to individuals who prefer installing something, i.e. an app or software that offers desktop updates.
  4. Email-based RSS feed readers: If you prefer updates delivered via mail, you should consider using an email-based feed reader. Google Alerts and Mozilla Thunderbird is a great example of an email-based reader. The reader has countless custom options offering both website owners and visitors unmatched functionality.
  5. Mobile feed RSS readers: Most people today browse the internet via mobile devices that include Smartphones, tablets, and laptops. If your website is visited by mobile device users, you should consider incorporating RSS readers that are mobile-friendly. The same applies for website visitors who use their mobile devices to access the internet. A mobile feed reader is better for such internet users. Feedly and Flipboard are great examples of mobile readers.

Benefits of RSS readers

RSS feeds are beneficial to both website owners and visitors. Displaying an RSS feed on a website is beneficial to a website owner because it allows website visitors to get updates on new content in a faster and more convenient manner. Since the internet is vast and competition is stiff, having a better way to deliver new content offers website owners unmatched competitive advantage. From a website visitor’s perspective, RSS improves the user experience. Website visitors don’t need to waste time visiting every single website to check if there are updates or not.

Popular RSS aggregators

It’s advisable to try several readers before selecting a preferred reader. As mentioned earlier, there are many readers out there. Some are free while others have both free and paid versions. Examples of popular RSS readers are listed below in regards to the operating system or browser in use.

  • Feedly: Recommendable for Android, iOS or webPanda: Chrome extension recommendable for web and iOS.
  • Feeder: recommendable for Chrome, Android and iOS.
  • Reeder 3: recommendable for iOS and Mac.