检查原始答案Here.
<div class="container" style="margin-top:20px; min-height:500px;" >
<div class="row">
<?php
$labels = new WP_Query(array(
\'post_type\' => \'slider\',
\'posts_per_page\' => 1000
));
while ( $labels->have_posts() ) :
$labels->the_post();
?>
<?php
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array(5600,1000 ), false, \'\' );
?>
<a href="#myModal-<? the_ID(); ?>" data-toggle="modal" >
<div class="span2" style="background: #09F url(<?php echo $src[0]; ?>) center no-repeat !important;">
<?php the_title();?>
</div>
</a>
<div id="myModal-<? the_ID(); ?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<h3 id="myModalLabel">
<?php the_title();?>
</h3>
<p>
<?php the_content();?>
</p>
</div>
<div class="modal-body">
<?php the_post_thumbnail(); ?>
</div>
<div class="modal-footer">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
</div>