Test if there are older posts in wordpress

I’ve got this function:

<?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts') ); ?>

It creates a link if there are older posts. How do I do something on the condition that there are no older posts? Anything I do that uses this function only seems to echo the link.

Related posts

Leave a Reply

1 comment