Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter sc0rp

    (@sc0rp)

    Thank you for reply, but maybe I was not clear enough to show the problem. The problem isn’t to put 2 loops on the same template, but dedicated pagination for each loop.

    I will try to clean code which I posted:

    <!-- first loop --->
    $query = array(
    	'category_name' => 'case-study',
    	'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1,
    	'showposts' => 2
    );
    
    query_posts($query);
    
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <!-- do_something-->
    <?php endwhile; endif; ?>
    <!-- end of first loop -->
    
    <!-- pagination for first loop -->
    <div class="navigation clearfix">
    		<div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div>
    		<div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div>
    	</div>
    <!-- end of pagination for first loop -->
    
    <!-- second loop -->
    $query = array(
    	'category_name' => 'projekty',
    	'paged' => $paged,
    	'showposts' => 1
    );
    query_posts($query);
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <!-- do something -->
    <?php endwhile; endif; ?>
    <!-- end of second loop -->
    
    <!-- pagination for second loop -->
    <div class="navigation clearfix">
    		<div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div>
    		<div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div>
    	</div>
    <!-- end of pagination for second loop -->

Viewing 1 replies (of 1 total)