调用目录页:
<ul class="mproductpic">
<?php if ($posts_perpage) { ?>
<?php $postsperpage = $posts_perpage; ?>
<?php } else { ?>
<?php $postsperpage =6; ?>
<?php } ?>
<?php
$categoryID=$cat;
$wp_query = new WP_Query('cat=' . $categoryID. 'orderby=date&order=desc&posts_per_page='.$postsperpage.'&paged='.$paged); ?>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href=<?php the_permalink() ?> title="<?php the_title(); ?>"><?php if(function_exists('wp_thumbnails_for_homepage')) { wp_thumbnails_for_homepage(); } ?></a>
<h2 class="mproductpicbt">
<?php the_title(); ?>
</h2>
</li>
<?php endwhile; ?>
<div class="clearfix"></div>
</ul>