Myzwer / foothillschurch

Bootcamp II is a wordpress theme (as well as an inside joke) designed to suit the needs of foothillschurch.com. It makes use of webpack, Babel, Sass, Tailwind, Browsersync, PostCSS, ESLint, Stylelint, Prettier and more. It is meant for that site, but if you can use it by all means go for it.
1 stars 1 forks source link

Wrap condition around the containing html #37

Closed rain2o closed 1 month ago

rain2o commented 1 month ago

https://github.com/Myzwer/foothillschurch/blob/effc5bbf81497ae99f0561ab7849412fe9272bfd/contact.php#L33-L52

Should wrap the entire container with the condition, so that way there's not an empty section.

<?php if (have_rows('detail_section')) : ?>
    <div class="bg-blue-gradient">
        <div class="md:w-8/12 mx-auto grid grid-cols-12 p-5 gap-4">
            <?php while (have_rows('detail_section')) : the_row(); ?>
                <div class="col-span-12 md:col-span-4 text-left mt-10">
                    <h3 class="text-2xl md:text-3xl mb-3 font-bold text-center"><?php the_sub_field('title'); ?></h3>
                    <div class="prose">
                        <?php the_sub_field('content'); ?>
                    </div>
                </div>
            <?php endwhile; ?>
        </div>
    </div>
<?php endif; ?>