Support » Themes and Templates » Change the RSS icon in 2.9

  • Any CSS pros know how to change the default rss icon in the sidebar widget? Its been answered elsewhere but I cant get it to work in 2.9

    My output looks like this in firebug…

    <a href="" class="rsswidget">
       <img src=""/>
    <a href="" class="rsswidget">
       from the main blog

    I’m getting very close with css. here’s what I have:

    #sidebar h2 .rsswidget img {display:none;}
    #sidebar h2 .rsswidget {background: url(images/rss.png) no-repeat; padding-left:24px;}

    because the class rsswidget is the h2 tag twice, the image shows twice when i use padding to move the text to clear the icon.

    I tried text-indent to move the text over, but it didnt work.

    Any ideas???

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator

    A link to your site might help…

    I was gonna post a followup, but it said the topic was closed for some reason.

    I don’t dislike the default rss icon, but I did figured out what was looking so strange about it… It has an orange background.

    i added the following css and fixed it

    #sidebar h2 .rsswidget img {background:transparent !important; padding-right:4px;}

    if you know how to replace the default rss icon, thatd be sweet!

    my site is here


    I’m certainly no pro, but I just had to fix this same thing due to the 2.9 update. It reverted it back to default for some reason… So I’d suggest taking out a pad of paper and noting this since future updates may revert it.

    Go to your wp-includes folder and find the images folder in there. There’s a file called “rss.png”. That’s the file that wordpress uses for that little rss feed icon in the default widget.

    If you want to do more customization you can go the CSS route (by calling the class) or edit the default-widgets.php file itself (probably normally better to edit the CSS file). But you can edit the PHP file directly too. To do that, just go into the default-widgets.php file and look for the code relevant to the rss widget. Just do a search for “rss.png” within the php file since we know that’s the image file the php file uses. In there you’ll find the code that controls the formatting, etc.:

    <img style=’background:orange;color:white;border:none;’ width=’14’ height=’14’ src=’$icon’ alt=’RSS’ /> $title“;

    Just change the background:orange to background:none (or whatever color you want it to be) and you’re done. Also, note the height and width is set to 14 pixels. That, of course, can be changed too… Anything can be… as I’m sure you now understand. As I mentioned above, you would probably be better served to just edit the CSS file. If you have issues with that this will always work. Hope that helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change the RSS icon in 2.9’ is closed to new replies.