so i'm trying to use 'foreach' to have each of the div generated to have an incremental id, eg box1 box2 box3 etc.
this in my php file
<div id="box">
<aside class="meta">
</aside>
<section class="post-content">
</section><!--/.post-content -->
</article><!-- /.post -->
generates 4 of this:
<div id="box">
<aside class="meta">
</aside>
<section class="post-content">
</section><!--/.post-content -->
</div>
how do i get (in a simplified form)
<div id="box1">
</div>
<div id="box2">
</div>
<div id="box3">
</div>
<div id="box4">
</div>
i've looked through an earlier question How to Assign a unique class to each item returned in a loop? but i can't make sense of it to work in my context.
UPDATE:
here's my unedited php code:
<div id="box" <?php post_class(); ?>>
<aside class="meta">
<a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>">
<?php echo get_avatar( get_the_author_meta('email'), '128' ); ?>
</a>
<span class="month"><?php the_time( 'M' ); ?></span>
<span class="day"><?php the_time( 'd' ); ?></span>
<span class="year"><?php the_time( 'o' ); ?></span>
</aside>
<section class="post-content">
<?php
if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] != 'content' ) {
woo_image( 'width=' . $settings['thumb_w'] . '&height=' . $settings['thumb_h'] . '&class=thumbnail ' . $settings['thumb_align'] );
}
?>
<header>
<h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<?php woo_post_meta(); ?>
</header>
<section class="entry">
<?php if ( isset( $woo_options['woo_post_content'] ) && $woo_options['woo_post_content'] == 'content' ) { the_content( __( 'Continue Reading →', 'woothemes' ) ); } else { the_excerpt(); } ?>
</section>
</section><!--/.post-content -->
</div><!-- /.post -->