Ultimately, I'm really confused on how exactly you create a single class that affects each post in a static home page "recent post" type content area. I want to essentially have it where there's a post with a background, a space, then the next post with the same background, but not have the background behind all the posts. I hope that makes sense. Here's the code I have, but no matter what I do, I'm only able to add a class for one post at a time with the ID.
<ul> <?php $the_query = new WP_Query( 'posts_per_page=5' ); ?> <div class="new_home_single"><?php the_post()?></div> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <?php the_excerpt(__('(more…)')); ?> <?php endwhile; wp_reset_postdata(); ?> </ul>