I have a content loop in Wordpress and within that loop I posted a gallery (also WP standard):
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>
That generates the following HTML:
<dl class="gallery-item">
<dt class="portrait">
<img src=".../foto03-150x150.jpg" class="attachment-thumbnail">
</dt>
</dl>
<dl class="gallery-item">
...
</dl>
The gallery has 11 images, so I need each of them to have a specific class.
Eg: Where class="gallery-item"
is written I need to be class="gallery-item1"
, class="gallery-item2"
and so on.