WordPress Snippets at WPcustoms

Add content after each RSS post

You could use this to add a return link back to your blog.


/**
 * Snippet Name: Add content after each RSS post
 * Snippet URL: https://wpcustoms.net/snippets/add-content-rss-post/
 */
  function feedFilter($query) {
    if ($query->is_feed) {
        add_filter('the_content','feedContentFilter');
    }
    return $query;
}
add_filter('pre_get_posts','feedFilter');
 
function feedContentFilter($content) {
    $content .= '

Posted at WPcustoms.net

'; return $content; }