Support » Fixing WordPress » Add an RSS icon to each category page

  • Resolved kReEsTaL



    I wonder how you can add a category RSS icon, linked to relative feed, besise the title on each category archive page.

    I.e: on this page, which is the category archive page for the Cinema category, I’d like to add the ‘Cinema’ RSS feed icon beside the ‘Archives pour la categorie Cinema’ title.

    Any help please? 🙂

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I found the solution all by myself, despite being no PHP geek (thanks to the Codex for nice explanations about get category link, even though it took me a while to find the right tag to use).

    In case anyone is interested, here is the solution to display a feed icon of the category you’re currently browsing:

    <?php echo '<a href="'. get_category_link($cat) . 'feed" title="Really Simple Syndication"><img src="'. get_bloginfo('template_directory') .'/images/rss.gif" /></a>'; ?>

    Yay me! 😀

    Result can be viewed on my blog.

    slightly more precise method, via otto42 through lorelle:

    <a href="<?php get_category_rss_link(true,$cat,$cat); ?>" title="<?php echo single_cat_title(); ?> feed"><img src="<?php bloginfo('template_directory') ?>/icons/rss.png" alt="feed icon" title="<?php echo single_cat_title(); ?> feed" /></a>

    Where would you put this code exactly? I’m using a theme that didn’t include RSS links at all, but would really like to add them to each article.


    Cool… now does anyone know how to make this happen with Feedburner?

    I’m using this to call the category in my archive page:

    <a href="?feed=rss2&cat=<?php echo get_query_var('cat'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="RSS for this category only"><img src=""></abbr>'); ?></a>

    But it’s not a feedburner feed, it’s just regular RSS.

    You can see what I mean when you click the RSS icon next to the Category name here:


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add an RSS icon to each category page’ is closed to new replies.