Last active
June 4, 2016 21:20
-
-
Save michaelschofield/687441df25b5c5cd1c5e to your computer and use it in GitHub Desktop.
Use Custom Feed for a Post Type
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( 'after_setup_theme', 'my_rss_template' ); | |
function my_rss_template() { | |
if ( get_query_var( 'post_type' ) == 'post_type' ) { | |
add_feed( 'custom', 'my_custom_rss_render') ; | |
} | |
} | |
function my_custom_rss_render() { | |
get_template_part( 'feed', 'custom' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Michael,
Came across your issue on the Advanced WP group. Had a similar issue to solve recently. The following links helped me, maybe they can be of some help to you.
http://churchm.ag/how-to-add-wordpress-custom-post-types-to-your-rss-feed/
http://wpsnippy.com/add-custom-post-types-wordpress-default-rss-feed/