bueltge
5/30/2011 - 7:00 AM

Example for add a Custom Post Type to the WordPress Post Feed

Example for add a Custom Post Type to the WordPress Post Feed

add_action( 'request', array( &$this, 'add_to_feed' ) );

// add to post-feed
function add_to_feed($request) {
	
	if ( isset($request['feed']) && !isset($request['post_type']) ) {
		$request['post_type'] = get_post_types( $args = array(
			'public'          => true,
			'capability_type' => 'post'
		) );
	}
	
	return $request;
}