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.

[php]
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’);
[/php]

Recommended For You

About the Author: staff

Leave a Reply

Your email address will not be published.