with Lorelle and Brent VanFossen

WordPress Feed Titles

I’ve been trying to create a list of the various feeds available on my site. I created such a list but when my feed reader scans the page for feeds, it lists every single one with the title of my site. This would be fine, but I wanted the title to reflect the names of the categories. It helps no one to have a list of 15 feeds and all of them titled “Taking Your Camera on the Road”. That’s no help.

With help from the WordPress Support Forum and Kafkaesqui from Guff Szub.net, here is the answer:

Note: This only works with RSS 2.0 feeds.

On our new Taking Your Camera on the Road – Feed List, we have listed a variety of the feeds available on our site. One example is to our Learning Zone, our most popular category covering educational material about photography, web, Internet, and more. The feed link looks like this:

http://www.cameraontheroad.com/wp-rss2.php?cat=8

The instructions on how to get the category “title” to show up in your RSS 2.0 feeds are as follows.

  1. Open the wp-rss2.php file in the root directory of your WordPress installation.
  2. Towards the top of the file, find <title><?php bloginfo_rss('name') ?></title>.
  3. Replace it with this:

    <title><?php bloginfo_rss('name'); ?><?php if(is_category()) echo ' : ' . wp_specialchars(get_the_category_by_id($cat)); ?></title>
  4. Save the file and upload it, if necessary, to your server.

Now, this comes with a price. You are changing one of the core programming files for WordPress. When you update WordPress, you will need to do this again. Save a text file in your root directory and in a safe place on your computer with a copy of these instructions so you will remember next time how to change this back.

One Comment

  • Posted August 9, 2006 at 9:48 | Permalink

    This page is just what I was looking for. Thanks for posting it!

Post a Comment

Your email is kept private. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>