Support

Account

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

  • What if i want to change the images on refresh..

    I am doing the following

    	<div style="background-image:url(<?php
    			if(get_field('header_banner_image') != '') {
    				echo get_field('header_banner_image');
    			} elseif($default_page_options['banner_image']) {
    					$url_array = parse_url($default_page_options['banner_image']);
    				echo get_site_url() . $url_array['path'];
    			} else {
    				echo get_site_url() . '/wp-content/themes/neo/images/bg-header.jpg';
    			}
    			?>); background-position: <?php
    								echo get_field('header_banner_position_x'); ?> <?php
    								echo get_field('header_banner_position_y'); ?>;" class="page-header-ban-img" >