Test if there are older posts in wordpress
I've got this function:
<?php next_posts_link( __( '<span class="meta-na开发者_如何学编程v">←</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.
Simply add a get_ to the function :)
<?php
if (get_next_posts_link()) {}
?>
精彩评论