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.

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() ) :
                    $notquery->the_post();
                    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
add comment

1 Answer 1

It worked with query_posts(). Thanks!

share|improve this answer
add comment

Your Answer

 
discard

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.