Tagging Partial RSS Feeds in WordPress

I haven't paid as much attention to the world of tagging content on the web as I should have. It just became one of those things that went on my list and never moved up high enough for me to do anything about. My loss really, as I believe there are some good opportunities for boosting a site's popularity and traffic with tags.

Tagging was made popular by Technorati, a site that tracks 62.5 million blogs. Yes, many of those are probably splogs, but that's a topic for another day. Technorati introduced the idea of a tag as a way for users to have their say on what a particular web page is about. If a page is about dogs then it could be tagged with “dog”. In addition, since a dog is a pet, it could make sense to tag it as such. The trickiest thing for users, I believe, is that tags don't need to be hierarchical. They often end up that way, but there's nothing stopping me from tagging a page with dog, family member, and annoying.

The reason for tagging a web page or RSS feed is to improve your chances of your site being seen by those that are searching for certain content. For example, if I wrote an authoritative page about canines and failed to use the word dog, users that rely solely on traditional search engines might not be able to find my article. By putting in the dog tag (clever pun, no?) I can tell tag-enabled search engines that my content is about dogs and hopefully attract some visitors. As previously, mentioned Technorati is one such tag-enabled search engine. So are IceRocket and Google's relatively new blog search.

But that's enough from me about the theory of tags. If you're interested in learning more, read this excellent introduction to Technorati tags. My real reason for this post is to discuss how to add tags to WordPress RSS feeds that deliver partial content rather than full articles. If your feeds contain full articles, then you don't need to worry about steps 2 – 7 below. Simply follow the instructions on the Bunny Tags plugin page for how to tag your content.

  1. First of all, you're going to need to download and activate the Bunny Tags WordPress plugin. It beats out SimpleTags because it uses entries in the WordPress database rather than requiring you to modify your posts. This way you can turn off the plugin with no ill-effects if you so choose. And deleting/updating the tag data is a snap with some basic MySQL skills.
  2. Next, you should revisit your blog's latest posts and add tags to the tag input box (it's added by the plugin). If your feed displays the last 10 posts, then you need to update the last 10 posts.
  3. Then, open the wp-rss2.php file that is in the root of your WordPress folder. I'm assuming that you're using RSS 2.0 for your blogs rather than RSS 0.92 or Atom. If you're using FeedBurner and point it to your RSS 2.0 feed, you're still in good shape.
  4. In the file you just opened, look for these lines:
    <?php if (get_settings(‘rss_use_excerpt')) : ?>
        <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
  5. Replace the second of these two lines so that you now have:
    <?php if (get_settings(‘rss_use_excerpt')) : ?>
        <description><![CDATA[<?php the_excerpt_rss() ?><?php if (function_exists(‘the_bunny_tag's)) { the_bunny_tags(‘<p>Tags: ‘, ‘</p>', ‘, ‘); } ?>]]></description>
  6. Save the file.
  7. Check out your RSS feed. You should now see a line that reads Tags: xxxx yyyy zzzz at the bottom of each entry.
  8. Ideally, you'll go back and tag all of your posts. Not so much for the RSS feed, but so that each page on your website is tagged for search engines that may one day pay attention to this information.
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail.