ben-g
2/22/2017 - 2:52 PM

ACF if statement get_field()

ACF if statement get_field()

 // This is the basic conditional that says, if there is text in the field, then show the field.  
 
  // However, it does not hide the field label.
  
  Example:  
  
  <div class="wrap">
				<div id="accreditation">
					<h3>Accreditation</h3>
					 <?php if( get_field('accreditation_description') ): ?>
      		 <?php the_field('accreditation_description'); ?>
    			 <?php endif; ?>
				</div>
				</div>