Support

Account

Home Forums General Issues Image Object and Image URL not working. Reply To: Image Object and Image URL not working.

  • Hi @sjl,

    Thanks for the post.

    For the Url return type, you can use the following code:

    $home_banner = get_field('field_name', 123); // 123 is the post id that the field is listed in.
    
    <script>window.home_banner = “<?php echo $home_banner; ?>”;</script>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class=”banner”>
    
    <h1>Bringing nature to you <span>wherever you are</span></h1>
    
    </div>