RSS for Pages Instead of Posts?

You can includes pages inside your RSS feed by adding this code into your theme or child theme’s functions.php file (Child theme is preferred so it doesn’t get removed with updates).

I tested this on a fresh install and it works. You can easily test by going to yourdomain.com/feed/.

function feed_request($qv){
    $rss_post_types = array('post', 'page');
    if(isset($qv['feed']) && !isset($qv['post_type']))
        $qv['post_type'] = $rss_post_types;
    return $qv;
}
add_filter('request', 'feed_request');

Reference – here

Leave a Comment