I am trying to show posts (up to 3 - hence the $count) that are in two categories only. the code i used is:
<? $count = 0 ; ?>
<?php query_posts(array('category__and'=>array(3,46))); ?>
<?php while (have_posts()) : the_post(); ?>
<?if ($count<3) {?>
<span class="listings"><a href="<?php the_permalink(); ?>" title="Permanent link to <?php the_title(); ?>"><?php the_title('','','»'); ?></a></span> <?php the_excerpt('Read the rest of this entry »') ?><a href="<?php the_permalink(); ?>" title="Permanent link to <?php the_title(); ?>">Click Here To Continue</a> <br> <br>
<? } ?>
<? $count ++;?>
<?php endwhile;?>
<?php query_posts('cat=12'); ?>
for some reason, i have to add in the last line:
<?php query_posts('cat=12'); ?> - which queries a non-existent category
if i don't do that, it shows the posts in it's entirety. why would i need that 2nd query post?
any help would be appreciated it.
Thanks,