Skip first attachment on a get_children array
-
I’m using get_children to display image attachments in a custom gallery, but I don’t want to display the first image as that is already shown as a bigger version. Someone suggested I could use ‘offset’ as an option but that doesn’t seem to work. Here is my IF conditional:
<?php if ( $images = get_children(array(
‘post_parent’ => get_the_ID(),
‘post_type’ => ‘attachment’,
‘post_mime_type’ => ‘image’,
‘order’ => ‘ASC’,
‘offset’ => 1
))) : ?>then there’s a ‘foreach’ after that. Any suggestions?
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Skip first attachment on a get_children array’ is closed to new replies.