Support

Account

Home Forums ACF PRO Show icon if checkbox is checked Reply To: Show icon if checkbox is checked

  • Hi John
    Here’s the full page code, less a few irrelevant bits…

    <?php get_header(); ?>
    <section class="content">
    
    <?php 
    
    if (have_posts() ) {
    query_posts($query_string . '&orderby=title&order=ASC');
    	while (have_posts() ) {
    		the_post(); ?>
    		
    <?php
    
    $guests = get_field('guests');
    $bedrooms = get_field('bedrooms');
    $king = get_field('king');
    $queen = get_field('queen');
    $double = get_field('double');
    $single = get_field('single');
    $bunk = get_field('bunk');
    $trundle = get_field('trundle');
    $sofa = get_field('sofa_bed');
    $lowday = get_field('low_day');
    
    ?>		
    
    <article class="promo">
    <a href="<?php echo get_permalink(); ?>">
    <img src="<?php the_field('accom_feature_photo', $post->ID); ?>" width="100%" alt="<?php the_field('accom_name');?> - <?php single_cat_title(); ?>" >
    <?php if($lowday): ?><div class="price">from <span>$<?php echo $lowday; ?></span></div><?php endif; ?>
    <h2><?php the_field('accom_name');?></h2>
    </a>
    <section class="quick-intro">
    <?php if (has_term('dunsborough-holiday-homes', 'type')) : ?>
    <ul class="quick-info">
    <?php if ($guests): ?><li><i title="guests" class="fa fa-user" aria-hidden="true"></i> <span> <?php echo $guests; ?></span></li> <?php endif; ?>
    <?php if ($bedrooms): ?><li><i title="bedrooms" class="fa fa-bed" aria-hidden="true"></i> <span> <?php echo $bedrooms; ?></span></li> <?php endif; ?>
    
    <?php $pets = get_field('hh_facilities'); 
    if( $pets && in_array('pet', $pets) ): ?><i ti-friendly" class="fa fa-paw" aria-hidden="true"></i>Pet<?php endif; ?>
    
    </ul>
    <?php endif; ?>
    
    </section>
    
    </article>
    	
    	<?php
    		
    	} // end while
    } // end if
    ?>
    </section>
    <?php get_footer(); ?>

    Thanks for taking a look