Home › Forums › General Issues › Homepage with Loop & ACF › Reply To: Homepage with Loop & ACF
Hi @allan.crabtree
ACF saves / loads data to and from a $post. Keeping this in mind, it would make sense to place the template code within the theme file that renders out the post’s data.
For a single page, this is most likely single.php or page.php
For a loop, your theme may be loading in a partial file called content-post.php – in which case this is also where you would want to place the code.
This of the_field as a similar function to the_content(); it is relevant only to the current post object, not the global WP site.
Hope that helps.
Thanks
E
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.