Support

Account

Home › Forums › Front-end Issues › Getting image url from image ID › Reply To: Getting image url from image ID

  • I tried the above change but the url is not been shown at all – the title works?

    <?php
    
    $back = get_field('bg_image');
    $size = 'full';
    if( $back ) { ?>
    
    <div class="bg-image" style="background-image: url('<?php echo $back['sizes']['full'];?>');">
    
      <div class="center-wrapper">
         <h1><?php the_title(); ?></h1>
      </div>
    </div>
    
    <?php } ?>