error pagination custom taxonomy
-
Good evening.
I have a problem with result pagination custom taxonomy. This is the code I use:
<?php get_header(); ?> <div id="page"> <h1><?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?></h1> <?php $type = 'portfolio'; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'post_type' => $type, 'archive-press'=>$term->slug, 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => 2, 'caller_get_posts'=> 1 ); $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query->query($args); ?> <?php if($wp_query->have_posts()) : ?> <div id="page_content"> <ul> <?php while($wp_query->have_posts()) : $wp_query->the_post(); ?> <li> <h2><?php the_title(); ?></h2> </li> <?php endwhile; ?> </ul> </div> <?php else : ?> <p><?php _e('Apologies, but no results were found for the requested archive.', 'mytemplate'); ?></p> <?php endif; ?> <?php if (function_exists("emm_paginate")) {emm_paginate();} $wp_query = null; $wp_query = $temp; ?> </div> <?php get_footer(); ?>
The results are displayed correctly, even the pagination. When I click on the second or third page tells me page not found!
Can you help?
Sorry for my English but not speak it very well
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘error pagination custom taxonomy’ is closed to new replies.