Hi guys! Is there any way to use offset on the results of a gallery?
For example, skip the first two photos and show from the third? In a common wp loop we use the offset, what would it be like with gallery field?
It would be more of a manual process. You can either create a counter and skip the first two or you can pull the first two images off the beginning of the array using http://php.net/manual/en/function.array-shift.php.
Thank you @hube2 , I don’t have much experience with php, so I’m going to “beat” enough to understand, but I appreciate your help.
To use a counter
$images = get_field('gallery_field');
$counter = 0;
foreach ($images as $image) {
if ($counter >= 2) {
// code to display image here
}
$counter++;
}