Support

Account

Home Forums General Issues Correct code for not pulling in field if it lacks a value Reply To: Correct code for not pulling in field if it lacks a value

  • Hi @Marion2318

    Conditional logic looks like this:

    
    <?php if( get_field('secondary_featured_image') ): ?>
    	<?php the_field('secondary_featured_image'); ?>
    <?php else: ?>
    	something else
    <?php endif; ?>