Multiple Thumbnails Sizes in single loop
-
Hi,
i’m looking to have two thumbnail sizes in a single loop. For example Cat 2 displays a small thumbnail and Cat 3 has a large full width image.
I know how I can have two loops on one page; one for cat 2 with small thumbnails and one for cat 3 with large thumbnails but I can’t mix the two categories chronologically.
Here is my loop displaying both categories displaying both categories with the same thumbnail dimensions.
<div id="content" role="main"> <?php query_posts('cat=2, 3 &posts_per_page=6'); while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_front_page() ) { ?> <h2 class="entry-title"><?php the_title(); ?></h2> <?php } else { ?> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <?php } ?> <div id="blackbar"></div> <div class="entry-content" id="thumbimg"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); set_post_thumbnail_size( 1000, 500 );?></a> <?php the_excerpt(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-content --> </div><!-- #post-## --> <?php endwhile; // end of the loop. ?> </div><!-- #content -->
I guess I’m wondering if you can set a different ID or Class for each category in a single loop?
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Multiple Thumbnails Sizes in single loop’ is closed to new replies.