Showing double navigation
-
I am using wordpress Focus theme and I replaced default navigation links with WP-PageNavi navigation.
But there is a problem…
In first and last page navigation shows ok:
https://postimg.org/image/tlrbm4tzn/ (screenshot)
But in other pages shows like this:
https://postimg.org/image/keb7xildt/ (screenshot)Default navigation code:
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?> <?php if ( get_next_posts_link() ) : ?> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'focus' ) ); ?></div> <?php endif; ?> <?php if ( get_previous_posts_link() ) : ?> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'focus' ) ); ?></div> <?php endif; ?> <?php endif; ?>
And code after PageNavi instructions:
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?> <?php if ( get_next_posts_link() ) : ?> <?php wp_pagenavi(); ?> <?php endif; ?> <?php if ( get_previous_posts_link() ) : ?> <?php wp_pagenavi(); ?> <?php endif; ?> <?php endif; ?>
What I need to change in code? Please help!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Showing double navigation’ is closed to new replies.