Support

Account

Home Forums General Issues Putting ACF fields inside other ACF fields Reply To: Putting ACF fields inside other ACF fields

  • It seems like you have a ways to go.

    To easily get the image behind the text using a background style with css would be the best way to go. You have to make div elements or other elements though, having simply data but not way to target it doesn’t help.

    Example:

    
    
    <?php while( have_rows(‘grouped_fields’) ): the_row(); }
    ?>
    <style>
    .modal-wrap{
       display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    }
    </style>
    <div class="modal-wrap" style="background: url("<?PHP echo $image_url; ?>") 50% 50% no-repeat">
        <h2><?php the_sub_field(‘title’); ?></h2>
        <p><?php the_sub_field(‘date’); ?></p>
        <p><?php the_sub_field(‘time’); ?></p>
        <p><?php the_sub_field(‘location’); ?></p>
    </div>
    <?php endwhile; ?>