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.78% (6.81%*) • Investment PI: 5.49% (6.32%*)

Author Details in WP RSS Feed

There are a lot of bloated plugins that will include data into your RSS feed... but it's simple to do with minimal 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
 Author Details in WP RSS Feed
4
 http://www.beliefmedia.com/code/wp-snippets/author-rss-feed
5
*/
6
 
7
function beliefmedia_author_rss_feed($content) {
8
 
9
  if(is_feed()) {
10
    $author = get_the_author();
11
    /* $description = get_the_author_description(); */
12
    $content .= "
13
 
14
Post written by $author
15
 
16
";
17
  }
18
 
19
 return $content;
20
}
21
add_filter('the_content', 'beliefmedia_author_rss_feed');
22
add_filter('the_excerpt_rss', 'beliefmedia_author_rss_feed');

While the code relates to printing the author name, any detail can be concatenated to the RSS text.

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

  E. Australia Standard Time [ UTC+10, Default ] [ CHECK TO CHANGE ]

  Want to have a chat?
 

Like this article?

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

Leave a comment