Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134450

rayo2010 on "pagination with 3 loops"

$
0
0

I have 3 loops in the same page

<?php while ( have_posts() ) : the_post(); ?>

					<?php

						$exp_date = get_post_meta($post->ID, "mp_end_date", true);

						if( $exp_date >= date("Ymd") ){

						$package_type= get_post_meta($post->ID, "package_type", true);
						$type1="Gold";
						$type2="Platinum";
						$type3="Normal";

						while ($package_type == $type1) :?>
					<li>
						<?php get_template_part( 'snippit', $post->post_type ); $package_type=""; ?>
					</li>
					<?php endwhile;?> 

					<?php	} ?>

				<?php endwhile; ?>

and

<?php	while ( have_posts() ) : the_post(); ?>

					<?php

						$exp_date = get_post_meta($post->ID, "mp_end_date", true);

						if( $exp_date >= date("Ymd") ){

						$package_type= get_post_meta($post->ID, "package_type", true);
						$type1="Gold";
						$type2="Platinum";
						$type3="Normal";

						while ($package_type == $type2) :?>
					<li>
						<?php get_template_part( 'snippit', $post->post_type ); $package_type=""; ?>
					</li>
					<?php endwhile;?> 

					<?php	} ?>

				<?php endwhile; ?>

and

<?php	while ( have_posts() ) : the_post(); ?>

					<?php

						$exp_date = get_post_meta($post->ID, "mp_end_date", true);

						if( $exp_date >= date("Ymd") ){

						$package_type= get_post_meta($post->ID, "package_type", true);
						$type1="Gold";
						$type2="Platinum";
						$type3="Normal";

						while ($package_type == $type3) :?>
					<li>
						<?php get_template_part( 'snippit', $post->post_type ); $package_type=""; ?>
					</li>
					<?php endwhile;?> 

					<?php	} ?>

				<?php endwhile; ?>

all those loops are in the same Cat . and then i use
<?php kriesi_pagination($wp_query->max_num_pages);?>
The problem here there are always some posts from the first loop on the 2nd page , and i want the first loop posts then the 2nd then the 3rd. i dont know whats wrong here.


Viewing all articles
Browse latest Browse all 134450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>