What I'm trying to do: create a numbered list of images with links to each image. List numbers are not sequential.
Variables:
$image->number - gives the first number;$image->next_pid - gives the following link:$image->total - gives the last number;
Code:
<?php $list_first = $image->number; $list_last = $image->total; for ($list_first = 1; $list_first <= $list_last; $list_first++) { echo($list_first); } ?>
Problem: This code contains a list of numbered lists that I need. I cannot figure out how to include the "next link" variable in a loop.
Example: number = 1; next_pid = link_ID2; total = 7. Thus, the list will look like this: 1 (without link) 2 (with link_ID2) 3 (link_ID3), etc. to 7. There is no link in the first image because it is already displayed. Sorry for not being clear enough.
You can see what I'm trying to do here . I have listed other photos in this gallery, but without a link. This is a wordpress site and a plugin that I use to display images in each gallery. You can view the PasteBin functions.php of this plugin.
source share