2 loops and different pagination
-
Hi,
I want to have 2 loops on one site and different pagination I tried to do for several hours also try to use it google but without result. I don’t have any idea how to do it without hack wordpress core anyone can help me?My template:
<?php if ( arras_get_option('single_meta_pos') == 'bottom' ) add_filter('arras_postfooter', 'arras_postmeta'); else add_filter('arras_postheader', 'arras_postmeta'); ?> <?php arras_above_post() ?> <div id="post-<?php the_ID() ?>" <?php arras_single_post_class() ?>> <h2 class="entry-title"> <a href=''>Projekty</a> </h2> <?php $query = array( 'category_name' => 'case-study', 'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1, 'showposts' => 2 ); query_posts($query); ?> <br /> <p style='color:#808080'><b>Case study</b></p> <table border=0 cellspacing=0 cellpadding=0> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <tr> <td width="158" align="right" class='cv' rowspan='2' style='vertical-align: middle; text-align: center;width158px!important;background-color: #fff;'> <?php $pictures = get_post_meta($post->ID, "pic", true); $tmp = explode(",", $pictures); ?> <img src='/wp-content/themes/arras-theme/library/timthumb.php?src=<?php echo urlencode($tmp[0]); ?>&w=176&zc=0' /> </td> <td align="left" class='cv' colspan='3'><b><?php the_title(); ?></b><p><?php echo arras_strip_content(get_the_excerpt(), 20); ?></p></td> </tr> <tr> <td width="67%"> </td> <td width="33%" align='right' class='details'><a href='<?php the_permalink(); ?>'>» Wi?cej</a></td> </tr> <?php endwhile; endif; ?> </table> <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?> <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> <?php } ?> <?php $query = array( 'category_name' => 'projekty', 'paged' => $paged, 'showposts' => 1 ); query_posts($query); ?> <br /> <p style='color:#808080'><b>Projekty</b></p> <table border=0 cellspacing=0 cellpadding=0> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <tr> <td width="158" align="right" class='cv' rowspan='2' style='vertical-align: middle; text-align: center;width158px!important;background-color: #fff;'> <?php $pictures = get_post_meta($post->ID, "pictures", true); echo $pictures; ?></td> <td align="left" class='cv' colspan='3'><b><?php the_title(); ?></b><p><?php echo arras_strip_content(get_the_excerpt(), 20); ?></p></td> </tr> <tr> <td width="67%"> </td> <td width="33%" align='right' class='details'><a href='<?php the_permalink(); ?>'>» Wi?cej</a></td> </tr> <?php endwhile; endif; ?> </table> <?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?> <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> <?php } ?> </div>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘2 loops and different pagination’ is closed to new replies.