Counters
<?php
$i = 1;
$i_padded = sprintf("%02d", $i);
echo $i_padded;
$i++;
?>
$counter = 1;
$class = ( ($counter % 2) == 0 ) ? 'even' : 'odd';
$counter++;
$counter = 1;
if ($counter % 3 == 0) {
$thumbnail = $thumbnails['sizes']['gallery-1'];
} else {
$thumbnail = $thumbnails['sizes']['gallery-4'];
}
$counter++;
($loop->current_post / 2) % 2 == 1
<?php
$i = 0;
if (($i + 1) / 2 % 2 == 0) {
$size = 'medium';
} else {
$size = 'medium-3';
}
$i++;
?>