Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An example of how to tweak WordPress's RSS feed to prefix the title with the relevant post format ('Aside', 'Gallery', 'Video', etc.). Add to functions.php
function add_post_format_to_title_rss( $title )
$post_format = get_post_format();
if( false === $post_format )
return $title;
else {
$format_name = get_post_format_string($post_format);
return "{$format_name}: {$title}";
add_filter( 'the_title_rss', 'add_post_format_to_title_rss' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.