嗨,我有一个页面显示20个特定类别的特色图像和信息,我希望能够有分页,这样我就可以有多个类别的页面。
我该怎么做?我似乎无法让它工作。
任何帮助都将不胜感激
谢谢
<?php get_header(); ?>
<div class="modus-grid">
<?php query_posts(array(\'category__in\' => array(5), \'posts_per_page\' => 20)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $currentid = get_the_id(); ?>
<div class="grid-box grid-block mod-box width33">
<div class="view view-first">
<?php if (get_the_post_thumbnail($currentid, array(167, 167)) != "") { ?>
<a href="<?php the_permalink(); ?>" /><?php echo get_the_post_thumbnail($currentid, array(300,600)); ?></a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" /><img src=\'<?php bloginfo(\'template_url\') ?>/images/default.png\' alt=\'Default\'/></a>
<?php } ?>
<div class="mask">
<h2><a href="<?php the_permalink(); ?>"><?php echo get_the_title($currentid); ?></a></h2>
<p><?php echo get_the_excerpt( $post->parent ); ?></p>
<a href="<?php the_permalink(); ?>" class="info">Read More...</a>
</div>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_query();
?>
<div class="clearfix">
</div>
<?php get_footer(); ?>