How to style latest post AND recent posts differently?
I would like to style the latest post and then the most recent posts differently than the rest of the posts in the regular loop. I’m kind of new to wordpress themes (I figure I’d throw that out there). I would like to use the more tag in there as well. Here is a link to an image to help describe what I’m trying to accomplish.
Here is the code that I have already:
Template Name: Home
<?php get_header(); ?>
<div id=”main”><div id=”main-1″>
<?php if (have_posts()) : ?>
<?php query_posts(“showposts=5”); ?>
<?php while (have_posts()) : the_post();
$postclass = ($post == $posts) ? ‘entry-1’ : ‘entry’; ?>
<div class=”post<?php echo $postclass; ?>” id=”post-<?php the_ID(); ?>”>
<h2 class=”clear”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
<div class=”entry clear”>
<?php the_content(‘Read More’); ?>
</div> <!– /post –>
<?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Any help that I can get with this would be awesome…
Thanks in advance 🙂
- The topic ‘How to style latest post AND recent posts differently?’ is closed to new replies.