这是我的设置.
single.PHP中
单我-category.PHP
- <?PHP
- if ( have_posts() ) : while (have_posts()) : the_post(); ?>
- <?PHP echo the_title(); ?>
- <div class="pagination">
- <div class="container">
- <div class="row">
- <div class="next col-xs-6 col-sm-6 col-md-6 col-lg-6">
- <?PHP next_post_link( '%link','<img src="' . get_template_directory_uri() . '/img/cs-left.png" /> PREVIoUS',true ); ?>
- </div>
- <div class="prevIoUs col-xs-6 col-sm-6 col-md-6 col-lg-6">
- <?PHP prevIoUs_post_link( '%link','NEXT <img src="' . get_template_directory_uri() . '/img/cs-right.png" />',true ); ?>
- </div>
- </div>
- </div>
- </div>
- <?PHP endwhile; endif; ?>
这就是我所追踪的 – http://codex.wordpress.org/Function_Reference/next_post_link
我不太清楚我在这里做错了什么,因为某些原因,即使函数的in_same_term参数设置为true,prevIoUs_post_link也会将我转到不同类别的帖子.
有任何想法吗?
谢谢.