Back to Top

How to add custom post type in RSS Feed?

Wordpress : To add custom post type into RSS

Recently I have been working on a WordPress which involved adding a custom post type.Most of you guys know how to create custom post type and for same plugins also available but Do you know how to add custom post type into WordPress RSS feed.

RSS stands for Really Simple Syndication which meant feed and Feed are the easiest way for visitors to subscribe.

In WordPress, It is very easy to add your custom post into Main RSS Feed and for that you need to write some lines of code into your theme’s functions.php file.

Let’s demonstrate code:

request filter is useful to apply with the query variables that are passed to the default main SQL query.so I have used it here which will custom query.Pre_get_posts is a filter used for altering SQL query.

I think easy enough, right? I’m hoping that you’ve found this article helpful.

Recommended Read:

To use Pagination with Taxonomy in WordPress
Share user Data in multiple WordPress Installation
File/Image Upload in WordPress

As always, thanks for reading. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

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

Most Popular Posts

How to Create and Use Cookies in PHP

Posted on 1 year ago

Bhumi

How to handle Exception in PHP5

Posted on 3 years ago

Bhumi

How to use Micro Data in HTML5

Posted on 2 years ago

Bhumi

Overview of ECMAScript 6 new Features

Updated 18 years ago

Bhumi

Getting started with Amazon Web Services

Updated 18 years ago

Bhumi

Facade implementation in Laravel

Updated 18 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 3 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 4 years ago

Bhumi