Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Custom RSS for WordPress
<?php
add_action( 'after_setup_theme', 'rss_template' );
/**
* Register custom RSS template.
*/
function rss_template() {
add_feed( 'media', 'custom_rss' );
}
/**
* Custom RSS template callback.
*/
function custom_rss() {
get_template_part('partials/feed', 'attachments');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment