Pagination with multi custom queries (1 post)

  1. Mehmet
    Posted 6 years ago #


    Please take a look at this site. The site has multi queries but still the pagination function works very good.

    What is the secret of using custom queries that would allow me to use pagination as well. A sample query that i use on my template is below, but pagination doesn't work with it

    <?php query_posts('cat=7&showposts=3'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	do stuff...
    <?php endwhile;?>
    <?php next_posts_link('&laquo; Older Entries') ?><?php previous_posts_link('Newer Entries &raquo;') ?>
    <?php else : ?>
    <?php endif; ?>
    do something else
    <?php query_posts('cat=1,3,4&showposts=3'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php endwhile;?>
    <?php else : ?>
    <?php endif; ?>

    I want Pagination to work on my first loop. But for some reason, when i click on next page, the address bar will change to somed paged=2 but index page will be displayed again.

    Any help in this matter is greatly appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic