我使用下面的代码并提供分页链接,遗憾的是每个分页页面都有相同的内容和主页原因?
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array( 'posts_per_page' => 3 ,'paged'=>$paged);
$the_query = new WP_Query( $args );
while ($the_query ->have_posts()) : $the_query -> the_post();
?>
<div id="pbox">
<div id="pthumb"><a href="<?php the_permalink(); ?>" class="ptitle"><?php the_post_thumbnail('thumbnail', array('class' => 'mythumbnail')); ?></a></div>
<div id="pcontent">
<a href="<?php the_permalink(); ?>" class="ptitle"><?php the_title(); ?></a>
<?php the_excerpt(); ?><br />
Post Category: <b><?php the_category( ', ' ); ?></b>
</div>
</div>
<?php
endwhile;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '/page/%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $the_query->max_num_pages
) );
echo $paged;
wp_reset_query(); ?>