Stop boring your feedburner subscribers with static email subject lines : Make feedburner subject line dynamic

January 31st, 2009 by admin

You write well thought out attention grabbing titles for your post. Unfortunately many of your email subscribers never get to see that title because it is inside an email with a boring subject line that gets repeated everyday. That pretty much sums up my frustration with feedburner emails.

Here is a simple wordpress hack that will make the subject lines of my feedburner mails dynamic. It sets the title of the latest post on your blog as the title of the feedburner email.

You need to edit 3 files in the wordpress source file for this to work

  1. feed.php
  2. feed-rss.php and
  3. feed-rss2.php

All 3 files are present in the wp-admin folder of your wordpress installation. These files are responsible for generating your rss feed. Please take a back-up of the files before proceeding with the below hack.

Edit feed.php
Locate the function get_wp_title_rss.  Replace the existing code of the function with the following

function get_wp_title_rss() {
global $post;
$myposts = get_posts(‘numberposts=1&offset=0′);
foreach($myposts as $post) :
$title = the_title();
endforeach;
 return $title;
}

Edit feed-rss.php and feed-rss2.php

Look for the line  <title> ………………………</title>  and convert it to <title><?php  wp_title_rss(); echo ” from “; bloginfo_rss(‘name’); ?></title>

That’s it. The subject line of your next feedburner email shall be title of your last post from your blogname.


Good TryStop boring your feedburner subscribers with static email subject lines : Make feedburner subject line dynamic612|just some value|9

Comments are closed.