如何在主页显示10篇文章,并在下面显示分页?是否可以使用have_post()
?WordPress的帖子分页
<?php if (have_posts()):
$incr=1;
while (have_posts()) : the_post(); ?>
<div class="postindex <?php echo (($incr%2==0)?'even':'odd') ?>" id="post-<?php echo $incr ?>">
<div class="postIncr"><?php echo $incr ?></div><h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title() ?></a></h1>
<div class="clear-float"></div>
<?php strip_tags(the_excerpt(__('Readmore ?')));?>
</div>
<?php $incr++; endwhile;
endif ?>
这是我的编码,我已经安装了wp_paginate,所以我怎么可以使用那里,我想说明6后在页面上提前
请不要downvote。如果你知道答案,那么在这里写下你的答案。如果没有任何答案或反馈,请勿downvote – 2012-03-02 19:04:35