Skip to content

Instantly share code, notes, and snippets.

@mdjwel
Created November 12, 2018 11:00
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 mdjwel/292b45c712867fc6463e14e562f4486e to your computer and use it in GitHub Desktop.
Save mdjwel/292b45c712867fc6463e14e562f4486e to your computer and use it in GitHub Desktop.
Increase loop value by decimal point number
<?php
if (is_array( $faqs )) {
$i = 0.2;
foreach ( $faqs as $faq ) {
?>
<div class="col-xs-12 col-sm-6">
<div class="single-faq wow fadeInUp" data-wow-delay="<?php echo $i ?>s">
<h5 class="title"><?php echo esc_html($faq['title']) ?></h5>
<p> <?php echo wp_kses_post($faq['description']) ?> </p>
</div>
</div>
<?php
$i = $i + 0.2;
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment