如果有人有任何建议或知道我做错了什么,那将是一个很大的帮助。我想每页3个自定义新闻帖子,然后链接到下一个新闻项目列表等等。我尝试了“下一页不发布”插件,这会将我带到下一个父页,即联系人页。谢谢
<?php
$paged = (get_query_var(\'paged\')) ? get_query_var(\'paged\') : 1;?>
<div style="float:right;"><?php echo "Page " . $paged;?></div>
<?php
$loop = new WP_Query(array(
\'post_type\' => \'news\',
\'paged\' => $paged,
\'posts_per_page\' => 3,
\'orderby\' => \'menu_order\'
));
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php get_template_part(\'news-single\', get_post_format() ); ?>
<?php endwhile; // end of the loop. ?>
<div class="pnavigation">
<div class="alignleft"><?php previous_posts_link(\'Previous\') ?></div>
<div class="alignright"><?php next_posts_link(\'More\') ?></div>
</div>