Next & Previous Button Don't Show Next Entries
-
Hi guys!
My next and previous does not work properly. Whenever I click those I just comes back to the same page with same entries BUT if I look one the the address bar you will see that it changes pages (i.e myurl.com/blog/ –> myurl.com/blog/page/2/). I’m pretty sure I need something, like a loop. I’m pretty new with this so thank you in advance.Here is my code for the Blog Homepage
<section class="blog"> <div class="container"> <h1>Blog</h1> <hr/> <?php query_posts("posts_per_page=3"); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <article> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> <div class="post-info"><?php include (TEMPLATEPATH . '/inc/meta.php' ); ?></div> <div> <?php global $more; $more = 0; ?> <!--To show more tag | yes = 0 , no = 1--> <?php the_content('<button class="read-more">read more</button>'); ?> </div> </div> <!--End post--> <?php endwhile; ?> <?php else : ?> <h2>Nothing found.</h2> <?php endif; ?> <div class="morePrev"> <?php next_posts_link('Next Entries'); ?> <?php previous_posts_link('Previous Entries'); ?> </div><!--end morePrev--> </article> </div><!--end of container--> </section>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Next & Previous Button Don't Show Next Entries’ is closed to new replies.