RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.20% (5.24%*) • Home Loan Fixed: 5.48% (6.24%*) • Fixed: 5.48% (6.24%*) • Variable: 5.20% (5.24%*) • Investment IO: 5.63% (6.88%*) • Investment PI: 5.49% (6.32%*)

Custom Content Above and Below Content in Your RSS Feed

When this article was originally published on Internoetics in 2009 it was primarily focused on advertising and mailing list subscriptions in RSS feeds. My handset at the time was a Nokia E72 so the majority of the remarks made in that article are a little redundant. However, adding content above or below your primary article content in an RSS feed hasn't lost relevance (although it might be argued that RSS feeds themselves aren't as relevant as they once were.

Adding a link back to your website at the top of content has become somewhat of a necessity to mitigate against content aggregators and other types of theft.

The Result

The result looks like this:

You can display whatever content you like.

The Code

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

1
<?php 
2
/*
3
 Custom Content Above and Below Content in Your RSS Feed
4
 http://www.beliefmedia.com/code/custom-content-rss-feed
5
*/
6
 
7
function beliefmedia_content_rss($content) {
8
 if (is_feed()) {
9
   $below = '<a href="' . get_permalink() . '">' . get_the_title() . '</a>, from <a href="' . site_url() . '">' . get_bloginfo() . '</a>';
10
   $content .= $below;
11
  }
12
 
13
 return $content;
14
}
15
add_filter('the_content', 'beliefmedia_content_rss');
16
add_filter('the_excerpt_rss', 'beliefmedia_content_rss');

Download our 650-page guide on Finance Marketing. We'll show you exactly how we generate Billions in volume for our clients.

  AUS Eastern Standard Time (Virginia)

  Want to have a chat?
 

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment