Add post to feed

Is it possible to add all the "posts" to the main rss feed (www.domain.com/feed) ?

    Philip John

    Hiya!

    This is actually fairly easy to achieve.

    Simply add the following code to your theme's functions.php:

    function myfeed_request($qv) {
    	if (isset($qv['feed']))
    		$qv['post_type'] = get_post_types();
    	return $qv;
    }
    add_filter('request', 'myfeed_request');

    Note that this will also include any other custom post types you have, so if you only want posts and listings, use the following;

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

    Of course, you could also have only listings;

    function myfeed_request($qv) {
    	if (isset($qv['feed']) && !isset($qv['post_type']))
    		$qv['post_type'] = array('listing');
    	return $qv;
    }
    add_filter('request', 'myfeed_request');

    I'll see if the developer fancies adding this as a feature, too!

    Cheers!
    Phil

    Code courtesy of WP Beginner