SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if( have_rows('collapse') ): ?>
  2.                 <div id="accordion" role="tablist">
  3.                     <?php $i=1; while ( have_rows('collapse') ) : the_row(); ?>
  4.                         <div class="card">
  5.                             <div class="card-header" role="tab" id="heading-<?php echo $i; ?>">
  6.                               <h5 class="mb-0">
  7.                                 <a data-toggle="collapse" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne">
  8.                                  <?php the_sub_field('title'); ?>
  9.                                 </a>
  10.                               </h5>
  11.                             </div>
  12.                             <div id="collapse-<?php echo $i; ?>" class="collapse <?php if ($i==1) { echo 'show'; } ?>" role="tabpanel" data-parent="#accordion" aria-labelledby="heading-<?php echo $i; ?>">
  13.                               <div class="card-body">
  14.                                 <?php the_sub_field('body'); ?>
  15.                               </div>
  16.                             </div>
  17.                         </div>
  18.                     <?php $i++; endwhile; ?>
  19.                 </div>
  20.             <?php endif; ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top