0

I have a page template has 2 columns. Each column has a loop for a single custom post type, with pagination.

The pagination links work for both columns, when you click any number it will take you to the page# for BOTH post types (there's a "sorry no more posts" message if one post type runs out of posts)

I want to maintain this functionality, but combine the pagination into only 1 section that checks the total number of posts for BOTH post types and creates the links based on that number, rather than having 2 separate link lists below each column.

How can I combine the pagination from these 2 loops OR combine the master loop but still break the posts into 2 columns, by post type?

I have already tried a few things

  1. 1 loop, 2 post types (do not know how to break this into 2 columns) http://pastebin.com/JyDgW0J3
  2. 2 loops, 2 columns, 2 paginations http://pastebin.com/k4Kp9t9s

thanks!

1 Answer 1

0

re 2. two loops, one pagination link: remove the individual paginations; add this at the end:

$max = max($ideas_query->max_num_pages,$opinions_query->max_num_pages);
if (function_exists('custom_pagination')) {
    custom_pagination($max,"",$paged);
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.