acf tabs

PHOTO EMBED

Fri Jul 26 2024 17:06:48 GMT+0000 (Coordinated Universal Time)

Saved by @BilalRaza12

      <div class="taxes">
                <div class="tabsmainwrappwer">
                    <div class="row">
                        <div class="col-md-3">
                            <div class="nav flex-column nav-pills tax-tabs" id="v-pills-tab-taxes" role="tablist"
                                aria-orientation="vertical">
                                <h4><?php the_field('tax_head'); ?></h4>
                                <?php if (have_rows('taxes')):
                                    $i = 0; ?>
                                    <?php while (have_rows('taxes')):
                                        the_row(); ?>
                                        <button class="<?php echo $i === 0 ? 'active' : ''; ?>"
                                            id="v-pills-taxes-<?php echo $i; ?>-tab" data-bs-toggle="pill"
                                            data-bs-target="#v-pills-taxes-<?php echo $i; ?>" type="button" role="tab"
                                            aria-controls="v-pills-taxes-<?php echo $i; ?>"
                                            aria-selected="<?php echo $i === 0 ? 'true' : 'false'; ?>">
                                            <span class="button-icon left-icon"><i class="fa-regular fa-file-pdf"></i></span>
                                            <?php the_sub_field('tax_tittle'); ?>
                                            <span class="button-icon right-icon"><i class="fa-solid fa-arrow-right"></i></span>
                                        </button>
                                        <?php $i++; endwhile; ?>
                                <?php endif; ?>
                            </div>
                        </div>
                        <div class="col-md-9">
                            <div class="tab-content tax-tabs-content" id="v-pills-tabContent-taxes">
                                <?php if (have_rows('taxes')):
                                    $i = 0; ?>
                                    <?php while (have_rows('taxes')):
                                        the_row(); ?>
                                        <div class="tab-pane fade <?php echo $i === 0 ? 'show active' : ''; ?>"
                                            id="v-pills-taxes-<?php echo $i; ?>" role="tabpanel"
                                            aria-labelledby="v-pills-taxes-<?php echo $i; ?>-tab">
                                            <?php if (have_rows('taxpdfs')): ?>
                                                <div class="pdf-buttons">
                                                    <?php while (have_rows('taxpdfs')):
                                                        the_row(); ?>
                                                        <a
                                                            href="<?php echo get_sub_field('tax_pdf_button_link'); ?>"><?php echo get_sub_field('tax_pdf_button'); ?></a>
                                                    <?php endwhile; ?>
                                                </div>
                                            <?php endif; ?>
                                        </div>
                                        <?php $i++; endwhile; ?>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
content_copyCOPY