We can't seem to get the template-tags.php the_posts_navigation function to care about basic edits at all:
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;
As you can see we added some exclamation marks to the posts links but WordPress could care less on the front end. It should show up on the index.php where there are plenty of posts to be seen and it stubbornly only shows "Posts navigation" as a main heading and "Older posts".
Please help! Thank you!
It appears that function in the template-tags.php file only has compatibility for WordPress versions prior to 4.1 and they are part of WordPress core.
Using the_posts_pagination() and/or next_posts_link() / previous_posts_link() is effective enough.