Home › Forums › General Issues › Deeply nested post types › Reply To: Deeply nested post types
Having an interesting problem while trying to display the results.
I made a gist of my code: https://gist.github.com/swthate/abc35769addcce27c03d
I’m following the basic loop with postdata example from http://www.advancedcustomfields.com/resources/relationship/
It is correctly echoing the title of the related town, but for the county it’s echoing the title of the “Hello World!” example post. Is that because $posts = get_field('town')
and $town = get_field('town')
are so similar? I have no idea. And, interestingly, it echoes the title of the town for the state.
So, this is what the output looks like:
Town: Burgerstadt
County: Hello world!
State: Burgerstadt
When it should look like:
Town: Burgerstadt
County: Nuechtegall
State: Minnesota
And yes, those, save for Minnesota, are filler nonsense names 😉
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.