Make first post different
-
Hi, I have this code setup to grab my blog posts. I want to have my first post styled different (HTML and CSS). Would I need to create a new WP_Query? I want to have 100% flexibility, so I’m guessing this would be best option? Could someone please tell me how to do this. Thanks.
<?php $blog_query = new WP_Query('category_name=blog&posts_per_page=5'); while ($blog_query->have_posts()) : $blog_query->the_post();?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h3><?php the_time('d/m/Y'); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <?php the_excerpt() ?> </div><!--post--> <?php endwhile; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Make first post different’ is closed to new replies.