• Okay I’ll try to explain this clearly.
    The normal WP_Query was working correctly pre-3.3.1 upgrade/update now it no longer is.

    for instance; a query to list all posts on a page such as: WP_Query('cat=115&posts_per_page=-1'); would show all posts say there are only 10 in that category and it listed 1-10 in order from 1-10 (1,2,3,4,5,6,7,8,9,10) but now its not showing post 1 at all, in fact it’s skipping post 1 (most recent) altogether starting with post 10 then shows post 2-10 (e.g. 10,2,3,4,5,6,7,8,9,10).

    So to say it another way. Previously it was showing it correctly as 1,2,3,4,5,6,7,8,9,10 now the same code is showing 10,2,3,4,5,6,7,8,9,10

    What happened to number 1? and why has number 10 replaced it? and most importantly please help me fix this. HELP!

    Thank you in advance.

    The code in question that previously worked as expected:

    <?php $query = new WP_Query('cat=115&posts_per_page=-1'); while($query->have_posts()) : $query->the_post();?>
    <div id="leftcolumn">
    <div id="thumbOfVideo"><?php echo get_post_meta($post->ID, "thumbofvideo", true); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "thumbOfVideo", true);?>" /></a></div>
    </div>
    <div id="rightcolumn">
    <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    <?php the_excerpt("350", "more"); ?>
    </div>
    <div class="hr"><hr /></div>
    <?php endwhile; ?>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP_Query not listing correctly’ is closed to new replies.