Created
May 30, 2011 07:00
-
-
Save bueltge/998531 to your computer and use it in GitHub Desktop.
Example for add a Custom Post Type to the WordPress Post Feed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment