WordPress.org

Ready to get started?Download WordPress

Forums

Previous and Next (4 posts)

  1. dudskie
    Member
    Posted 6 years ago #

    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; ?>
  2. dudskie
    Member
    Posted 6 years ago #

    Please help...

  3. dudskie
    Member
    Posted 6 years ago #

    Somebody help.. Nobody answers me.

  4. ccoupe
    Member
    Posted 6 years ago #

    Oddly enough, folks select themes based on the front page and later discover that the archives and categories aren't what they want. So they fix the theme or get better one or they get a plugin or hire someone. A little reading in the codex about themes will help you.

    PHP is very picky about missing and extra characters.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.