How to Add Post Types Feed to Your WordPress Main Rss Feed


Add custom post types feed to your WordPress main RSS feed.

Add the following code to your functions.php file, change ‘theme’, ‘coupon’ to your own custom post types.

function rss_post_types($query) {
    if ($query->is_feed) {
        $query->set('post_type', array('post', 'theme', 'coupon'));
    return $query;
add_filter('pre_get_posts', 'rss_post_types');

Share please!

Some of the links on this site are affiliate links. This means if you click on the link and purchase the item, I will receive an affiliate commission.

Leave a Reply