Home › Forums › Front-end Issues › true false won't show unless ticked in order › Reply To: true false won't show unless ticked in order
You missplaced the span
opening tags before the questions if each field is present. Also there should always be one identical id at the current page, so change the parameter of the ids. (also change id="button"
to class="button"
)
<h1 style="font-size:18px; color:#1e238b;"> FEATURES</h1>
<?php if( get_field('dab_radio') ): ?>
<span id="one"><?php the_field('dab_radio') ?></span><div class="button">DAB Radio</div>
<?php endif ?>
<?php if( get_field('bluetooth') ): ?>
<span id="two"><?php the_field('bluetooth') ?></span><div class="button">bluetooth</div>
<?php endif ?>
<?php if( get_field('air_con') ): ?>
<span id="three"><?php the_field('air_con') ?></span><div class="button">Air conditioning</div>
<?php endif ?>
<?php if( get_field('sat_nav') ): ?>
<span id="four"><?php the_field('sat_nav') ?></span><div class="button">Sat Nav</div>
<?php endif ?>
<?php if( get_field('heated_seats') ): ?>
<span id="five"><?php the_field('heated_seats') ?></span><div class="button">Heated Seats</div>
<?php endif ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.