get_gallery_image_ids(); $gallery_class = ''; if( $attachment_ids ){ $gallery_class = 'twp-has-thumbnail'; } ?>