Link to untitled entries in next/previous navigation
My template currently has the following code:
<p><?php previous_post('« %', '', 'yes'); ?> :: <?php next_post('% »', '', 'yes'); ?></p>
This display as :
« Previous post title :: Next post title »
where “Previous post title” and “Next post title” are the actual links to the single entry page itself.
But I have many entries which are UNTITLED — so no link appears!
I’ve been trying to find a way to make it so that if there’s no title, then use some text, such as “(untitled)” as the link itself.
I can’t seem to find anything in the Codex that allows you to do this. Anyone know if there’s a plugin or piece of code I don’t know about yet?
- The topic ‘Link to untitled entries in next/previous navigation’ is closed to new replies.