我有以下几点:
<?php $num_cols = 2; // set the number of columns here
$args = array(
\'post_type\' => \'testimonials\',
\'posts_per_page\' => 4,
\'orderby\' => \'ID\',
\'include\' => \'883, 563, 568, 106\',
\'order\' => \'\'
);
query_posts($args);
if (have_posts()) :
for ( $i=1 ; $i <= $num_cols; $i++ ) :
echo \'<div id="col-\'.$i.\'" class="col">\';
$counter = $num_cols + 1 - $i;
while (have_posts()) : the_post();
if( $counter%$num_cols == 0 ) : ?>
<div id="box">
<?php the_post_thumbnail(\'post-thumbnail\', array(\'title\' => \'\', \'alt\' => \'\')); ?>
<?php the_excerpt();?>
</div>
<?php endif; $counter++;
endwhile;
echo \'</div>\';
endfor;
endif;
wp_reset_query();
?>
我想,只要把帖子ID放进去,我就可以让特定的帖子出现,并且只显示那些帖子。不幸的是,情况似乎并非如此。所以我想知道是否有人知道我如何做到这一点。提前感谢!