Skip to content

Instantly share code, notes, and snippets.

@s3w47m88
Created December 6, 2018 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s3w47m88/df55cc04b6e04181f66b2d9378cead7b to your computer and use it in GitHub Desktop.
Save s3w47m88/df55cc04b6e04181f66b2d9378cead7b to your computer and use it in GitHub Desktop.
if( have_rows('tt_front_page_image_calls_to_action_right_column_images') ):
$count = 1;
if ( $count % 6 == 1 ) {
$value = "myClass";
} else if ( $count % 6 == 4 ) {
$value = "myClass";
} else {
$value = '';
}
while ( have_rows('tt_front_page_image_calls_to_action_right_column_images') ) : the_row();
echo "<div class='col-md-4 col-sm-12 " . $value . "'>";
echo "<img class='tt-explore-section-trailers-image' src='" . get_sub_field('tt_front_page_image_calls_to_action_right_column_images_image') . "' />";
echo "</div>";
$count++;
endwhile;
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment