我新设置了wordpress,并使用以下代码在主页中添加上一个分页
next_posts_link(\'Older Entries »\', 0);
previous_posts_link(\'« Newer Entries\', 0);
分页URL工作正常。单击上一个链接时,它会转到http:www.mydomain。com/blog/page/2/URL,但未加载内容。它显示相同的第一页博客文章列表。我有70篇博文,每页显示4篇博文。如何在分页URL中加载帖子?我需要做点什么吗。htaccess或WP设置更改?
$args = array(\'numberposts\' => 4);
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post);
$a = get_post_custom();
$blogroll_image = $a[\'mainImage\'];
print(\'
<section class="main_post bg_white fl">
<section class="post_img fl">\');
print(\'<a href="\' . get_permalink() . \'"><img src="\'.$blogroll_image[0].\'" width="385" height="385" alt=""/></a>\');
print(\'</section>
<section class="post_content fl col_light_blue">
<p>\' . get_the_date() .\' </p>\');
the_title(\'<a href="\' . get_permalink() . \'"><h1 class="col_light_blue">\', \'</h1></a>\');
print(the_excerpt(\'<p>\', \'</p>\'));
print(\'</section>
<!-- end .main_post -->
</section>
<div class="spacer_1px"></div>\');
endforeach;
next_posts_link(\'Older Entries »\', 0);
previous_posts_link(\'« Newer Entries\', 0);