RSS is simple ways to tell our readers what news on our site. Now let’s me show you how to add some content to the end of your RSS posts. In this first example, we’ll add a simple line that says:
“Thanks for reading, check out Your Blog name for more WordPress news!”
1- Open your functions.php file
2- Write down Add Content to the End of Each RSS on functions.php
function feedFilter($query) {
if ($query->is_feed) {
add_filter('the_content','feedContentFilter');
}
return $query;
}
add_filter('pre_get_posts','feedFilter');
function feedContentFilter($content) {
$content .= '<p>Thanks for reading, check out <a href="'. get_bloginfo('url') .'">'. get_bloginfo('name') .'</a> for more WordPress news!</p>';
return $content;
}
That’s it’s now if you check on your RSS Feeds you’ll find extra content at there.