Skip to content

Instantly share code, notes, and snippets.

@gregrickaby
Last active January 25, 2023 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregrickaby/9403680 to your computer and use it in GitHub Desktop.
Save gregrickaby/9403680 to your computer and use it in GitHub Desktop.
Custom RSS template for WordPress
<?php
add_action( 'after_setup_theme', 'my_rss_template' );
/**
* Register custom RSS template.
*/
function my_rss_template() {
add_feed( 'short', 'my_custom_rss_render' );
}
/**
* Custom RSS template callback.
*/
function my_custom_rss_render() {
get_template_part( 'feed', 'short' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment