Support » Fixing WordPress » Hack: Add a feed logo to wp-rss2.php

  • When I upgraded to 1.5.1, I noticed that one of my old hacks to 1.2 was lost when I went to subsequent versions. Ah well. I figured I’d share this little one I did in case anyone else is an RSS junkie. Not for the faint of heart (make backups) but very, very easy.

    1. Open your wp-rss2.php file in your WordPress folder.
    2. Go down to about line 30, right after the language declaration and right before the “loop” for each individual item.
    3. Add the following lines of code …

      <image>
      <url><?php bloginfo('template_directory'); ?>/images/feed_logo.png</url>
      <title><?php bloginfo_rss('name'); ?></title>
      <link><?php bloginfo_rss('url') ?></link>
      <height>88</height>
      <width>31</width>
      <description><?php bloginfo_rss("description") ?></description>
      </image>

    4. Create a 88×31 pixel image (a standard size for this) called feed_logo.png and upload it to the images in your theme folder. If you’d rather put it elsewhere in the theme folder, modify the code above accordingly.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hack: Add a feed logo to wp-rss2.php’ is closed to new replies.