Home › Forums › General Issues › Image field used in template not always returning image url › Reply To: Image field used in template not always returning image url
Since your code is not in the loop it might also be a good idea to send the page ID along with it.
<?php global $post; ?>
<div class="parallax-bg medium-parallax-bg" data-stellar-background-ratio="0.4" style="background-image: url(<?php echo get_field('featured_header_image', $post->ID); ?>)">
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.