previous_image_link()
-
Hello,
At the end of a post I use the following for the next/previous post navigation:
<?php previous_post_link('<small>Previous post:</small>« %link') ?> <?php next_post_link('<small>Next post:</small>%link »') ?>
This way, I don’t get the “Next post:” or “Previous post:” text if there isn’t a next or previous post.
I would like to achieve the same thing with the next/previous image navigation in the gallery.
At the moment I am using:
<small>Previous image:</small><?php previous_image_link() ?> <small>Next image:</small><?php next_image_link() ?>
This will still display the “next image” text regardless if there is a next image or not.
What can I do with the next_image_link() and previous_image_link() so as to make it only display the next or previous image text if there actually is a next or previous image?
Cheers,
Kalon.
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘previous_image_link()’ is closed to new replies.