Support

Account

Home Forums General Issues Show one image or the other Image Reply To: Show one image or the other Image

  • Hi @dailyreup

    This will show the first image if it exists, otherwise fallback to the secondary image. If none exists nothing will show.

    
    <?php
    $header_image = ( get_field('header_banner_image') ? get_field('header_banner_image') : get_field('secondary_header_banner_image') );
    if( $header_image) {
    ?>
    	<img src="<?php echo $header_image; ?>" alt="" />
    <?php } ?>
    

    Is that what you where after?