Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

acf if image else display other image

<?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 } ?>
Source by support.advancedcustomfields.com #
 
PREVIOUS NEXT
Tagged: #acf #image #display #image
ADD COMMENT
Topic
Name
4+7 =