我们似乎无法得到模板tags.php the_posts_navigation功能关心基本的编辑都:下划线_s the_posts_navigation WordPress的不更新文本
if (! function_exists('the_posts_navigation')) :
/**
* Display navigation to next/previous set of posts when applicable.
*
* @todo Remove this function when WordPress 4.3 is released.
*/
function the_posts_navigation() {
// Don't print empty markup if there's only one page.
if ($GLOBALS['wp_query']->max_num_pages < 2) {
return;
}
?>
<nav class="navigation posts-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e('Posts navigation', 'mytheme'); ?></h2>
<div class="nav-links">
<?php if (get_next_posts_link()) : ?>
<div class="nav-previous"><?php next_posts_link(__('Older posts!!', 'mytheme')); ?></div>
<?php endif; ?>
<?php if (get_previous_posts_link()) : ?>
<div class="nav-next"><?php previous_posts_link(__('Newer posts!!', 'mytheme')); ?></div>
<?php endif; ?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
endif;
正如你可以看到,我们增加了一些感叹号标记到帖子的链接,但WordPress可能不太关心前端。它应该显示在index.php上,其中有很多帖子可以看到,它固执地只显示“Posts navigation”作为主标题和“旧帖子”。
请帮忙!谢谢!