Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Possible Duplicate:
Custom Post Type Pagination Doesn't Work in Wordpress 3.4

I updated to wordpress 3.4 and after so my pagination broke showing not found on page/2 etc. I am using custom post types and custom query such as:

<?php
  $type = 'products';
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;  
  $args=array(
    'post_type' => $type,
    'post_status' => 'publish',
    'paged' => $paged,    
    'caller_get_posts'=> 1
  );
  $temp = $wp_query;
  $wp_query = null;
  $wp_query = new WP_Query();
  $wp_query->query($args);
?>

is there any possible fix for that? thank you.

share|improve this question
    
Try saving your permalinks settings again –  Bainternet Jun 22 '12 at 22:27
    
Duplicate of wordpress.stackexchange.com/q/56256/2411 –  Márton Molnár Jun 29 '12 at 17:03
add comment

marked as duplicate by toscho Jun 29 '12 at 17:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

Where is this code? It's hard to tell without more info, but it looks like you're trying to change the main query but are just running a new one. If so, you should be using the pre_get_posts hook. Otherwise your paging links will reflect the main query (which is what you want to modify) instead of the new one that you're showing on the page.

share|improve this answer
add comment

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