WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im creating a WP for a custom type post in a page template:


                global $paged;
                global $notquery;
                $temp = $notquery; 
                $notquery = null; 

                $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 

                $args = array(
                    'post_type' => 'noticias',
                    'paged' => $paged,
                    'posts_per_page' => 1


                $notquery = new WP_Query($args); 

                while ( $notquery->have_posts() ) :
                    global $post;

And it just dont works properly. I can access page 2 with /page/2/. So, paged seems to work. It prints out the wp-paginate navigation div, but nothing inside it.

   <div class="navigation"></div>

Whats the problem guys? thanks!

share|improve this question
What function or method are you using for the navigation links? Why are you setting $notquery to null? You also need to be using wp_reset_postdata() – Chris_O Apr 17 '13 at 3:36
Found the problem. It worked pretty well with query_posts(). Thanks! – Lucas Veiga Apr 17 '13 at 18:21
See wordpress.stackexchange.com/questions/4696/… for a proper solution. – toscho Apr 17 '13 at 18:24

It worked with query_posts(). Thanks!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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