I'm trying to change my RSS feed titles to display the post type beforehand but it's not working.
Code below. Any ideas?
Thanks
function changeRSStitles($content) {
global $post;
if (get_post_type($post) == 'literature') {
$content = 'Literature: '.$content;
} else if (get_post_type($post) == 'recipe') {
$content = 'Recipe: '.$content;
} else if (get_post_type($post) == 'restaurant') {
$content = 'Restaurant: '.$content;
} else if (get_post_type($post) == 'post') {
$content = 'Sugar Street Blog: '.$content;
}else {
$content = $content;
}
return $content;
}
add_filter('the_title_rss', 'changeRSStitles');
