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 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 *

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

Most Popular Posts

How to use Git init command

Posted on 1 year ago


How to convert RGB to Hex color PHP?

Posted on 5 years ago


Learn about Variables in LESS CSS

Posted on 4 years ago


How to use Session Save Path in PHP

Posted on 6 years ago


How to Detect the Orientation of Ipad

Posted on 6 years ago