0

如何在 Wordpress的single.php文件中制作导航链接以穿越受人尊敬的类别

<nav id="nav-single">
   <h3 class="assistive-text"><?php _e('Post navigation', 'twentyeleven'); ?></h3>
   <?php previous_post_link('%link', __('<div class="nav-previous"></div>', 'twentyeleven')); ?>
   <?php next_post_link('%link', __('<div class="nav-next"></div>', 'twentyeleven')); ?>
</nav>
4

1 回答 1

0

好的,我明白了...将第三个参数设置为 TRUE ($in_samecat = TRUE) 将遍历同一类别...谢谢

<nav id="nav-single"> <h3 class="assistive-text"><?php _e('Post navigation', 'twentyeleven'); ?></h3> <?php previous_post_link('%link', __('<div class="nav-previous"></div>', 'twentyeleven'),TRUE); ?> <?php next_post_link('%link', __('<div class="nav-next"></div>', 'twentyeleven'),TRUE); ?> </nav>

于 2012-11-22T07:50:42.237 回答