multiple pagenavigation for multiple categories on one page
-
Hello there,
I’m working on a site where I load multiple custom templates in 1 page. In 2 of the templates I load in posts of 2 different categories.
With some help of you guys I figured out how I got the navigation (via wp-pagenavi) work, with 1 categorie on the site. But now I have 2 and things are going wrong.
For example: I’ve got 2 posts for categorie A and 2 for categorie B. The navigation should show 2 pages per categorie, but instead It shows 4. Yet categorie A filters the posts for A and vice versa. So if I’m on page 1 or 2 I see a post at categorie A, but none at B. And when I’m on page 3 or 4 I see a post at categorie B, but none at A.
It seems to act like 1 navigation for both.
This is the code in the 2 templates I use to load the categories:
<?php global $wp_query, $meta ,$paged; $page = (get_query_var('paged')) ? get_query_var('paged') : 1; $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query('cat=3'); $wp_query->query("paged=$page&cat=3&showposts=2&order=ASC");?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
Can you help me please? Thanks in advance!
[ Please don’t bump, that’s not permitted here. ]
- The topic ‘multiple pagenavigation for multiple categories on one page’ is closed to new replies.