Previous and Next
I have this code, it works fine to my website but I need to add a code that will work with Previous and Next because I have 50 posts on my blog that is category 4 and I want it everytime I have to click the Next it will show the next 5 category 4. Vice versa I have to click the Previous to go to the previous 5 list category 4. How I am going to put that code using the code below. Thanks.
<?php query_posts('cat=4&showposts=5'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="permalink to <?php the_title(); ?>"><?php the_title(); ?></a></p> <p><?php the_time('d, M, Y') ?></p> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
- The topic ‘Previous and Next’ is closed to new replies.