wordpress: previous_post_link() / next_post_link() placeholder

Posted by superUntitled on Stack Overflow See other posts from Stack Overflow or by superUntitled
Published on 2010-06-09T06:37:46Z Indexed on 2010/06/09 6:42 UTC
Read the original article Hit count: 130

Filed under:

I am having trouble with the previous_post_link() and next_post_link() functionality. When there is no previous post, the function previous_post_link() does not display a link, likewise for the next_post_link() and the last post. I would like to have a placeholder image so that the design stays consistent.

Currently I have images of green arrows pointing left and right, I would like to place an image of a grey arrow if there are no more posts to go back to.

Is there a way to use the next_post_link()/previous_post_link() functions but not have the link removed.

I also wonder if there is a way for the links to cycle, so that if you come to the most recent post, the next post link would bring you back to the first post.

© Stack Overflow or respective owner

Related posts about Wordpress