Several query_posts wont work..
-
How do i get several query posts to work with my loop?
I want to exclude the category, and only show 3 posts, but its only the exclude category that works..My code looks like this:
<?php query_posts( 'cat=-3', 'posts_per_page=3'); ?> <?php $i = 0; while( have_posts() ) : the_post(); $i++; ?> <div id="post" class="post-<?php echo $i; ?>"> <a href="<?php the_permalink(); ?>"> <div id="image" class="image-<?php echo $i; ?>"> <?php the_post_thumbnail(); ?> </div> </a> <div id="excerpt" class="excerpt-<?php echo $i; ?>"> <a href="<?php the_permalink(); ?>"> <h2><?php the_title(); ?></h2> </a> <br/> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?>
Thanks for your help ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Several query_posts wont work..’ is closed to new replies.