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.