I’m pretty sure this is not the proper or quickest way to do it, but it works.
<?php if (!get_adjacent_post('', '', true)) : ?>
<div class="navposts"><?php previous_post_link('« %link') ?><?php next_post_link('%link »') ?></div>
<?php elseif (!get_adjacent_post('', '', false)) : ?>
<div class="navposts"><?php previous_post_link('« %link') ?><?php next_post_link('%link »') ?></div>
<?php else : ?>
<div class="navposts"><?php previous_post_link('« %link') ?> — <?php next_post_link('%link »') ?></div>
<?php endif ; ?>
Here some notes.
Hi, thanks for answering.
The suggestion of replacing the dash with a subtler character is welcome. I had in mind something close: choosing | maybe one could apply a solution that I happened to find for a different case.
This also shows that you are not that lazy…
I think I’m going to follow the suggestion but at this very moment I’m actually in stubborn mode, as I downloaded this theme that I really like and found this minor bug that I will have to fix or die, I suppose…