WordPress: Multiple Custom Loop in One Page with Pagination

I find the explanation here very useful : http://codex.wordpress.org/The_Loop#Multiple_Loops
, except it doesn’t tell me how to get pagination for multiple loops. I read some similar questions here too, but they are either not answered or doesn’t really work. Below are the codes I use for two different custom loops:

$myLoop1 = new WP_Query("tag='myTag1'&showposts=5"&paged=" . $paged ); 
while($myLoop1->have_posts()) : $myLoop1->the_post();
//do something...
endwhile;



$myLoop2 = new WP_Query("tag='myTag2'&showposts=5"&paged=" . $paged ); 
while($myLoop2->have_posts()) : $myLoop2->the_post();
//do something...
endwhile;

The tutorial here: http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin/ should be able to get the pagination done smoothly, but I tried many many times, it never work. The link of page is always www.myDomain.com/page/# which is a general page address instead of my custom loop.

Read More

Moreover, is it possible to ajaxify the pagination so visitors can go to different pages of the loops while staying on the page? This is minor, the first question is much more important to me. Thanks in advance!

Related posts

Leave a Reply

1 comment