经过一些额外的研究,似乎需要使用两种不同的方法才能使下一页/上一页/帖子正常工作。
更多here,here 和here
页面解决方案:
<?php
$pagelist = get_pages(\'sort_column=menu_order&sort_order=asc\');
$pages = array();
foreach ($pagelist as $page) {
$pages[] += $page->ID;
}
$current = array_search(get_the_ID(), $pages);
$prevID = $pages[$current-1];
$nextID = $pages[$current+1];
?>
<div class="navigation">
<?php if (!empty($prevID)) { ?>
<div class="alignleft">
<a href="<?php echo get_permalink($prevID); ?>"><img src="arrow-left.png"></a>
</div>
<?php }
if (!empty($nextID)) { ?>
<div class="alignright">
<a href="<?php echo get_permalink($nextID); ?>"><img src="arrow-right.png"></a>
</div>
<?php } ?>
</div><!-- .navigation -->
岗位解决方案
<?php previous_post(\' %\', \'<img src="arrow-left.png" alt="Next" border="0" align="right" />\', \'no\'); ?>
<?php next_post(\' %\', \'<img src="arrow-right.png" alt="Next" border="0" align="right" />\', \'no\'); ?>