I need to change the title of the feed that appears in the top in mywebsite.com/feed. I have tried editing files in wp-includes and also have tried this code :

 function filter_wp_title_rss( $get_wp_title_rss, $deprecated ) { 
    // make filter magic happen here... 
    return 'new title'; 
}; 

// add the filter 
add_filter( 'wp_title_rss', 'filter_wp_title_rss', 10, 2 ); 

But this does not work.

1 Answer
1

In functions.php of theme:

add_filter( 'wp_title_rss', 'my_rss_filter', 20, 1 );

function my_rss_filter( $rss_title ) {
    $rss_title="New Title";
    return $rss_title;
}

I added a lower priority of 20, and just ditched the deprecated stuff altogether.
You could just return a text string as you have it, of course, but I included the rest for a more complete reference.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *