Created
November 13, 2018 09:53
-
-
Save mdjwel/ed818702c5a22b180d9daca30ca4ce71 to your computer and use it in GitHub Desktop.
bootstrap row loop, loop after a specific number of loops, striped loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!empty($settings['works'])) { | |
$i = 0; | |
foreach ( $settings['works'] as $work ) { | |
++$i; | |
?> | |
<div class="col-xs-12 col-sm-6 col-md-5 <?php echo ($i % 2 == 0) ? 'col-md-offset-2' : ''; ?>"> | |
<div class="single-experience"> | |
<div class="date"><?php echo esc_html($work['datetime']) ?></div> | |
<h4 class="title"><?php echo esc_html($work['title']) ?></h4> | |
<p><?php echo esc_html($work['description']) ?></p> | |
</div> | |
<div class="space-30"></div> | |
</div> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment