A cleaner, simpler RSS feed

January 15, 2011

I've long wanted to modify the way my "link posts" show up in the RSS feed; effectively, I wanted to go from the "DoubleTitle" to the "Out and About." For years my link posts have been presented in the RSS feed like this:

Title of RSS item (links to the permalink on my site)
Repeated title (links to the content I'm discussing)
Excerpt/Commentary (if any)

Now, those posts should look like this:

Title of RSS item (links to the content I'm discussing)
Excerpt/Commentary (if any)
 (links to the permalink on my site)

Obviously then the main reason for the change was to remove the double title, which, even with seasoned readers, sometimes could cause confusion (and I've always hated how it looked). While there are a few plugins available to enable WordPress to handle this sort of thing, I decided to go it alone because I generally shy away from using plugins I didn't write. (Yeah, it's probably a control thing… and an I'll-sleep-better-at-night thing.)

The modifications really weren't too bad. I just added a custom field to hold the content link, and, where applicable, modified the relevant theme files to use the custom field instead of the permalink. Because I have thousands of link posts using the now-old style, and because I didn't want to immediately walk through and change each of them to the new style (there's just no way to automate it), I added some code to the singles and archives templates to take care of both the old and the new styles, so that link posts display the same regardless of how they were saved on the backend.

With respect to the index page, I changed all of the link posts now appearing there to the new style (and modified index.php to display them correctly) so that the new/old-style check isn't required going forward. The same goes for the RSS template.

I think I've taken care of everything, but if something looks/feels wonky, please let me know.

You should follow me on Twitter here