How to: Add a rss link on each post

Someone asked “How to create a rss link displayed on each post?”on WpRecipes forum. Althought this is very easy to do, many WordPress users seems to wonder how to do it. The answer is simple, read on!

To create a rss suscribtion link under each post, edit the single.php file from your theme.
Locate the WordPress loop, and simply add the link below.

<?php if (have_posts()) :
     while (have_posts()) : the_post();
         // WordPress loop ?>
         <div class="rss-box"><a href="http://feeds.feedburner.com/wprecipes">Enjoyed this post? Suscribe to my RSS feeds!</a></div>
        <?php endwhile; ?>
<?php endif; ?>

As you can see, I embedded the rss subscription link with a <div> html element. This way, it will be very easy to edit style.css and style it to fit your theme look and feel.

Leave a Comment

* Name, Email, Comment are Required