I am loosin a postIn my custom query, why ?
I have 10 post in category. whenevery time I do the requestquery for ALL the post in thatposts from a particular category: using WP_Query($arg).I get 9 post, all of them BUT the last created. Then a create a new one, there is 11 post now, then, i get and the category has 10 posts for example, last oneI seem to be missing... WHAT APPEND a post. So querying for 10 posts only returns 9, querying for 11 posts only returns 10 and so on. WP going crazy Does anyone know why I am always missing one post in my query results?
thisThis is the notworking code.. I am using that is not working. but someSome of my other test still docode tests have returned the same thingresults.
if($carouselOnOff){?>
<div id="carouselContainer">
<h2 id="sponsorsTitle"><?php echo get_cat_name( $carouselCategory ) ?></h2>
<ul id="carousel">
<?php $showPostsInCategory = new WP_Query(); $showPostsInCategory->query('cat='. $carouselCategory .'&showposts='. $carouselNumber .'');
if ($showPostsInCategory->have_posts()) : while ($showPostsInCategory->have_posts()) : $showPostsInCategory->the_post();?>
<li>
<?php $data = get_post_meta( $post->ID, 'key', true ); ?>
<a href="<?php if ($data[ 'custom_link' ]) { echo $data[ 'custom_link' ];} else { the_permalink(); } ?>">
<?php the_post_thumbnail('sponsor', array('title' => "")); ?>
</a>
</li>
<?php endwhile; endif; ?>
</ul><!--end carousel-->
</div><!--end carouselContainer-->
<?php } ?>