The simplest way may be to check the menu_order as you loop through the attachments, ie (pseudo-code):
foreach($attachments as $attachment => $attachment_array ) {
if( $attachment['menu_order'] > 0 ) {
// Do your thing here.
}
}
Thank you very much for your reply. I really didn’t consider the way you mentioned. I think I’ll give it a try 🙂
The more comfortable way would be to get the filtered attachments directly from the database, as I need them to count, set the next / previous link and so on….
All I want to do is to exclude some images from the gallery without putting id’s into the shortcode. So I want to use 0 or -1 in the order field to ignore them. Maybe I’ll try to extend the built-in gallery with an ‘ignore’ field….
Thanks,
Thomas