I want to show two different images between the home page e the other page. To do that I'm using Advanced Custom Fields.
In my header.php i have this:
<?php
$image = get_field('banner');
if ( is_home() ) { ?>
<div class="container-fluid container-first-image" style="background-image: url('<?php echo $image['url']; ?>'); background-repeat:no-repeat; background-position:bottom; background-size:cover; height:550px; color:white; font-family:'Alegreya Sans', sans-serif; font-weight:700; text-align:center; margin:0; padding:0; width:100%;"><?php }
else { ?><div class="container-fluid" style="background-image: url('<?php echo $image['url']; ?>'); background-repeat: no-repeat ;background-position: center; background-size: cover; height: 350px; color: white; font-family: 'Alegreya Sans', sans-serif; font-weight: 700; text-align: center; margin: 0; padding: 0; width: 100%;"><?php } ?>
Using this code my home page shows up the latest image I've uploaded in a post instead of the image i want to show. In other page all works fine.
In Settings --> Reading I've checked "Your Latest Post" in "Front Page Displays" item
How can i fix this?