0

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

Got it working! Just had to resync the feedburner feed

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.