I started from the theme Hemingway and Kyle used a $first = true; php variable to take the left margin off of the first post on the index with a CSS class of first. I am trying to make a fairly complex layout with a few instances of The Loop but what I need is a php counter of some sort that adds a class of first (or any class for that matter) on the first post and subsequently on every 3rd post after that. I know this is a php question but this being such a basic concept in php, the documentation is slim and general.
This is what the $first variable corresponds to:
<div id="<?php the_ID(); ?>" class="story photography_post<?php if($first == true) echo " first" ?>">
The main idea being that I can have aligned margins on both sides while running a 3 column post setup no matter how many posts I put up there.
Thanks in advance!