WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

$paged for pagination is awlays returning 1, so no matter what page i click "1" is always highlighted and it always shows the same posts. i have tried a million different combinations of things to fix and nothing works :(



        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
echo $paged;
        $mixtapes = new WP_Query ( array
          ( 'post_type' => 'mixtapes', 'posts_per_page' => 4, 'paged'=>$paged ) 

        while ($mixtapes->have_posts()) : $mixtapes->the_post();

          $img_id = get_post_meta($post->ID,'image',true);
          $img_url = wp_get_attachment_url($img_id);

          <a href="<?php the_permalink(); ?>"><img class="cover" src="<?php echo get_bloginfo('url').'/timthumb.php?src='.str_replace("http://freshnewmixtapes.net","",$img_url).'&q=100&h=176&w=176'; ?>" alt="<?php the_title(); ?>" />
          <h3><?php echo the_title(); ?></h3>

          <a href="<?php the_permalink(); ?>" class="download">Download</a>
          <a href="<?php the_permalink(); ?>" class="play">Play</a>


       <?php ?>

<br style="clear:both;">
<?php wp_pagenavi( array( 'query' => $mixtapes ) );
share|improve this question
up vote 1 down vote accepted

See Pagination Parameters under WP_Query in Codex:

Since Wordpress 3.0.2, you do get_query_var( 'page' ) instead of get_query_var( 'paged' ). The pagination parameter 'paged' for WP_Query() remains the same.

share|improve this answer
damnit :o well thanks so much... – Tallboy Mar 19 '12 at 4:12

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.