What I'm trying to do: create a numbered list of pictures with links to each picture. The list numbers are not consecutive.
Variables:
$image->number- gives the first number;$image->next_pid- gives the "next 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 lists the numbered list of pictures that I need. What I can't figure out is how to include the "next link" variable into the loop.
Example: number = 1; next_pid = link_ID2; total = 7. So the list will look like this: 1 (without link) 2 (with link_ID2) 3 (link_ID3) etc. until 7. The first picture doesn't have a link because it's already showing. Sorry for not being explicit enough.
You can view what I'm trying to do here. I've listed the other pictures in that gallery but without a link. It's a wordpress site and a plugin I'm using to display the pictures in each gallery. You can view on PasteBin the functions.php of that plugin.
numbermight contain 5,totalmight contain 10, andnext_pidcontains a link to the page that shows 11 - 15?var_dump($image)? Because I can't figure out what it structure might be.