提问者拒绝将他的解决方案作为答案发布,因此我冒昧地将这个问题从我们日益增多的未回答问题列表中删除…
<?php
$logo = get_post_meta($post->ID, \'_lm_comm_logo\', true);
$map = get_post_meta($post->ID, \'_lm_comm_map\', true);
$args = array(
\'numberposts\' => -1,
\'orderby\' => \'menu_order\',
\'order\' => \'ASC\',
\'post_type\' => \'attachment\',
\'post_mime_type\' => \'image\',
\'exclude\' => array($logo,$map),
\'post_parent\' => $post->ID
);
if ( $photos = get_posts($args) ) : ?>
<div class="slides">
<?php foreach ( $photos as $photo ) : ?>
<div class="slide">
<a href="<?php
echo $photo->guid;
?>" class="lightbox" rel="community[<?php
echo $post->ID;
?>]"><?php
echo wp_get_attachment_image($photo->ID, \'thumbnail\');
?></a>
</div>
<?php endforeach; ?>
</div>
<?php
endif;