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:
County: Hello world!
When it should look like:
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!