我使用下面的代码获取所有类别的最新帖子。 我想排除2个类别。即最新职位不应包括第1类和第3类的职位。
<?php
$number = get_option('woo_tabs_latest'); if (empty($number) || $number < 1) $number = 5;
$the_query = new WP_Query('cat=' . $GLOBALS['featured_cat'] . '&showposts='. $number .'&orderby=post_date&order=desc');
while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;?><li>
<?phpwoo_get_image('image',48,48,'thumbnail',90,$post->ID,'src',1,0,'','',true,false,false); ?>
<a title="<?php _e('Permalink to ', 'woothemes'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
<span class="meta"><?php the_time($GLOBALS['woodate']); ?></span>
<div class="fix"></div>