Older Post not working.
-
Hello, I am making a website with the yoko theme. there is one problem left with the site. the problem is that you cannot click on the “Older Post” link on the homepage. when you do you get the permalink /page/2
But this page looks exactly the same with the same post not the following 3 in line. This is the php script i use, i searched the web but couldn’t find my answer so i was hoping to find it here.<?php /* Start the Loop */ ?> <?php $myqueryname = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query->query('showposts=3'.'&paged='.$paged); ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php /* Display navigation to next/previous pages when applicable */?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <nav id="nav-below"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'yoko' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'yoko' ) ); ?></div> </nav><!-- end nav-below --> <?php endif; ?>
Thanks in advance!
- The topic ‘Older Post not working.’ is closed to new replies.