• I would like to display a filler in the spot if there is no next post and/or previous post. So that when you click on the first link, there is a special “filler” div displaying a dash or something to signify that something belongs in that spot.

    Does that make sense?

    Does anyone know a conditional code to check if there is a next post and “else {” put something else?

    Here is my current code:

    <div class="prevlink"><?php previous_post('%','Previous Post<br></a><span style="font-weight: normal">', 'yes');?></div>
            	   		 <div class="nextlink"><?php next_post('%','Next Post<br></a><span style="font-weight: normal">', 'yes');?></div>

    I want to add <div class="filler">&mdash;</> if there is no prev or next post link

    Thanks!!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Conditional previous_post and next_post’ is closed to new replies.