The default WordPress RSS feed includes only the default post types but the custom post types are not included. The following quick WordPress code snippet will help you to include WordPress custom post types to your web site RSS feed.

Add the following snippets to your WordPress theme functions.php file:

// Add links to rss feed 
function add_to_custom_feed($qv) {
	if (isset($qv['feed']) && !isset($qv['post_type']))
		$qv['post_type'] = array('post', 'books', 'events');
	return $qv;
}
add_filter('request', 'add_to_custom_feed');

Save the changed functions.php and visit your your WordPress site RSS feed url. For example my site URL is http://feeds.feedburner.com/javatechig. Notice that now your RSS Feed will include the posts from custom post types.

-Advertisement-

Tagged in : RSSWordPress

Join The Discussion

Please note: We reserve the right to delete comments that contains snarky remarks, offensive or off-topic. To know more read our comments policy.

Comments are closed here.