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; ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.