previous_post_link question
-
Hello
I have an image gallery made of posts, to have the image clickable to go to the previous post ( i post the images in reverse order so image 1 is the last posted, image 10 (of ten) the first posted), i have the following code:
$img = "<img src=\"/image/galleries/" . $catnicename . "/" . $image ."\" alt=\"" . get_the_title() . "\" />"; if (previous_post_link('%link', $img, TRUE) == Null) { echo $img; } else { previous_post_link('%link', $img, TRUE); }
this does everything i want, on all images excpet the last one clicking on the image goes to the next image, whilst on the last one the image is displayed on its on.
However on all images but the last i have 2 identical images, is there any way i can suppress the checking of previous_post_link in the if statment from printing to screen?
If not can anyone else thing of a way round this problem?
Thanks in advance
David
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘previous_post_link question’ is closed to new replies.