next_posts_link and previous_posts_link don’t work
-
I have this code in my navigation.php file:
if ( is_singular() and !is_page() ) { ?> <!--BEGIN .navigation-links--> <div class="navigation-links single-page-navigation"> <div class="nav-previous"><?php previous_post_link( '« <span class="nav-meta">%link</span>' ); ?></div> <div class="nav-next"><?php next_post_link('%link <span class="nav-meta">»</span>'); ?></div> <!--END .navigation-links--> </div> <?php } else { ?> <!--BEGIN .navigation-links--> <div class="navigation-links page-navigation"> <span class="nav-next"><?php next_posts_link( '<span class="nav-meta">«</span> Older Entries' ); ?></span> <span class="nav-previous"><?php previous_posts_link( 'Newer Entries <span class="nav-meta">»</span>' ); ?></span> <!--END .navigation-links--> </div> <?php } ?>
and this query in Main Index Template:
<?php query_posts('showposts=1');
and in reading settings “blog pages show at most 20 posts”. When I click “Older entries” on home page, it returns a 404 error page. What is wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘next_posts_link and previous_posts_link don’t work’ is closed to new replies.