Having a "featured posts" second loop with images
-
Hi,
I am designing a newspaper website with a featured post loop at the top. This is the first time I have used a second loop and it makes all my pages only feature the category I want on top, including pages. Here is my code:
<?php query_posts( 'category_name=featured&showposts=3' );?> <?php while( have_posts() ) : the_post(); ?> <?php if(has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php the_post_thumbnail(array(640,300)); ?> </a> <?php } ?> <?php endwhile;?> <?php rewind_posts(); ?>
Can anyone help me with what is going wrong? All the information in the codex wasn’t helping.
Jordan
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Having a "featured posts" second loop with images’ is closed to new replies.