I'm trying to change my RSS feed titles to display the post type beforehand but it's not working.

Code below. Any ideas?


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');

Got it working! Just had to resync the feedburner feed

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.