previous/next_post_link used like posts_nav_link on single/permalink post
-
Hi, on single/permalink posts this:
<div class="navposts"><?php previous_post_link('« %link') ?> — <?php next_post_link('%link »') ?>
displays:
? prevposttitle — nextposttitle ?
when viewing an “intervening” post so that there are both a previous post and a next post.
But it displays:? secondposttitle —
when viewing the first post,
— secondtolastposttitle ?
when viewing the last post.
How do I prevent the long dash (—) to display in these cases? I’m not practical with php. I suppose there’s if/else involved but i wouldn’t know how to write it.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘previous/next_post_link used like posts_nav_link on single/permalink post’ is closed to new replies.