WordPress.org

Ready to get started?Download WordPress

Forums

Hack: Add a feed logo to wp-rss2.php (3 posts)

  1. yearginsm
    Member
    Posted 9 years ago #

    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 88x31 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.
  2. Denis de Bernardy
    Member
    Posted 9 years ago #

  3. mattgartzke
    Member
    Posted 8 years ago #

    Thanks for the walkthrough yearginsm! I've been wanting one of these for my father's site.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.