Skip to content

Instantly share code, notes, and snippets.

@brunolimadevelopment
Created March 16, 2020 21:12
Show Gist options
  • Save brunolimadevelopment/73e9fcad162baa661ac3d5f656a6710a to your computer and use it in GitHub Desktop.
Save brunolimadevelopment/73e9fcad162baa661ac3d5f656a6710a to your computer and use it in GitHub Desktop.
[PHP] PAR OU IMPAR
<?php $i=1; foreach ($settings['cronograma_options'] as $item): ?>
<div class="pa-component-wrap-cronograma__item <?php echo ( $i % 2 == 0 ) ? 'pa-component-wrap-cronograma__item--reverse' : '';?>">
<div class="pa-component-wrap-cronograma__info">
<div class="data"><time><?php echo data_evento($item['cronograma_options_data']); ?></time></div>
<div class="title wow fadeInUp" data-wow-duration="1.5s" data-wow-delay="1s"><?php echo $item['cronograma_options_title']; ?></div>
<div class="desc wow fadeInUp" data-wow-duration="1.5s" data-wow-delay="1.5s"><?php echo $item['cronograma_options_desc']; ?></div>
</div>
<figure class="pa-component-wrap-cronograma__figure wow <?php echo $item['jornada_options']; ?>">
<?php foreach ($item['cronograma_options_img'] as $img) :
echo wp_get_attachment_image( $img, 'full', "", array("class" => "thumb wow fadeIn", 'alt' => get_the_title(), 'title' => get_the_title(), 'data-wow-duration' => '1.5s', 'data-wow-delay' => '1s' ));
endforeach; ?>
</figure>
</div>
<?php $i++; endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment