Home › Forums › Front-end Issues › Nested Post Object Fields › Reply To: Nested Post Object Fields
@hube2 Many thanks for the further input.
At first glance I couldn’t see anything in your notes that I hadn’t tried. Then I noticed that you were referring to using a nested Relationship field instead of nested Post Object fields and the penny dropped for how I should be solving this. As Post Objects seem to only work using $post, your code was obviously not working. Switching to using a Relationship field instead, and using your suggested code is now working just great.
I just need to remember for future instances that Relationship fields should be the way to go instead of Post Objects for most uses, as they are able to use their own separate query, without getting thrown by being forced to use the main setup_postdata($posts) query.
I’ve probably worded all that horribly, but hopefully you get the idea! Thanks to all for the help!
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.