Increase RSS Subscribers With WordPress Conditional Tags

This is the scenario: a new visitor, or a visitor returning after some absence, reads through the main page of your blog and clicks a “previous entries” or “older posts” link. Who is this visitor? What do we know about them? Well, 1. they want to read more content (congratulations!) and 2. (in the case of the returning visitor) they’re not subscribing to your blog.

How can we remind them of the benefits of subscribing at just the right moment, when the benefits are clearly apparent? Easy. Use a WordPress conditional template tag.

<?php if ( is_paged() ) : ?>
<div id="rss-remind">
<p>Subscribe to <?php bloginfo( 'name' ); ?> and never miss an entry:<br />
<a href="<?php bloginfo( 'rss2_url' ); ?>">All Posts<span> (RSS)</span></a> | 
<a href="<?php bloginfo( 'comments_rss2_url' ); ?>">All Comments<span> (RSS)</span></a></p>
</div><!-- #rss-remind -->
<?php endif; ?>

Here’s how it works: if someone clicks your “previous entries” link WordPress catches that with is_paged() and displays our little message that we’ve conveniently placed just above the Loop. This is what it looks like in the default theme on my test blog, “WordPress Theme Development”:

Remember, this is unstyled (and with a horrid <br /> tag—feel free to remove it) but there’s enough hooks in the markup there to make something that looks really cool.

Now when someone checks out what they’ve missed on your blog, or what other great content you’re offering, by clicking through to your paged entries, they see an option to never miss anything again. Sounds like a good idea to me.

15 thoughts on “Increase RSS Subscribers With WordPress Conditional Tags”

  1. Glad to be helpful, Ptah. And different from the crowd: for better or worse—and mostly by accident—I usually follow my own path.

  2. I’m wondering why you put your PHP if (is_paged()) BETWEEN the and not wrapping the div. If the div is customized with with padding and background it could be horrible to see.

    And actually I don’t understand why on paged content : why not on single post or pages ? I can’t get the point of the increase just through paginated content.

  3. As Oncle Tom noticed it, the condition should embrace the div, otherwise causing some disturbing display effects. Shouldn’t it?

    The interest of conditionning the invite to paged display is explained within the above post: it suppose that your reader asks for next page, that (most probably) signifies that he’s not yet read previous posts and thus not yet subscribed to tour blog. Despite the fact you promote your RSS feeds in many places of your blog 😉
    Thanks to this contextual invite, the reader may be receptive and click to subscribe.

    That’s How I understood.

  4. Hum… not to used to read code, actualy the “if” is within the “div”, the fact is it could be better around the “div”, instead.

  5. Thanks, fxbodin and Oncle. I changed the code. You’re both right, the div should have been within the statement.

    Oncle, a subscribe-call-to-action works great on single post pages too. I was sorta just pointing out an untapped use of WordPress tags and typically unused spot in WordPress themes. Hope that helps get into my thinking.

  6. I implemented the trick on Chroniques de l’Iboga. It works (waiting for new subscribers, now)

    Actually you may make your blog act so whatever your (supposed new) reader internal link clicks: tag, category, contextual link…

  7. Ian, I definitely agree on this usage.

    Maybe all this could be done through WordPress filter hooks ? If yes, it’s a good idea for a plugin and a simple admin configuration like that :
    [ ] promote feeds on posts
    [*] promote feeds on paged results
    [ ] promote feeds on search results

  8. Hey Ian, you should enter this tip in my Building RSS Group Writing Project:

    All you would need to qualify for over $350 in prizes – including consults with Liz Strauss and David Airey – is to link your above article to the announcement post at the above link. Although additional tips before Sunday night’s deadline would increase your chances of winning even more.

  9. Hi Ian

    I am a beginner in blogs and I am not sure if my blog has the RSS .. I would like to incorporate that into my site and also increase subcribers with WordPress conditional tags which again I am not sure what tags are. I am so lost with using WordPress. Now my WordPress control panel says My backup folder might be visible to public, so you help me fix this problem. I lost some 20 over comments due to my technical problem that I would not login to wordpress and have to create a new account. Is there anyway I can retrieve back these comments?

    Under Meta, it shows I have Entries RSS and Comments RSS.. What are these and how to tell my friends who visit my site what to do with them?

    Thank you 🙂

Comments are closed.