02 February 2014

How to include Pages in feed rss of Wordpress manually

include page to wordpress feed
It is useful when your wordpress site have only pages and no post. You can add your pages into the feed.


Do the following things:

  • Go to Editor on leftside menu of Dashboard of Wordpress admin panel.
  • Look for functions.php on right side, open it.
Add the following code :

// Add Pages to RSS Feeds
function myfeed_request($qv) {
if (isset($qv['feed']) && !isset($qv['post_type']))
$qv['post_type'] = array('post', 'page');
return $qv;
}

Done.



Special Thanks to : wpbeginner.com

Also Thanks to this link: wordpress.stackexchange.com




(If you found this article useful then share with your friends.)

No comments: