RichardC
(Richard C)
1
First, thanks for this plugin.
My template looks like:
<Loop acf_relationship=news_person>
<a href="<Field url />"><Field title /></a>
</Loop>
It is meant to create a list of links to people who are related to a news post via an ACF relationship field.
The result is:
<a href="https://page-where-code-is-located/<Field url/>">Joe Smith</a>
The docs for Relationship say See Post Loop for available fields. I think URL and Title should both work, but I’m not sure where I’m going wrong.
Cheers, Richard
avanti
(Emmanuel Soyer)
2
Maybe the <> in the template tag in the HTML markup have to be escaped?
But i’m not sure how to proceed, maybe by doubling them:
<a href="<<Field url />>">
1 Like
RichardC
(Richard C)
3
Thanks @avanti,
I just found Tag in attribute in the docs says to replace < with { So this works:
<Loop acf_relationship=news_person>
<a href="{Field url}"><Field title /></a>
</Loop>
I would mark this post as solved, but I don’t think that option has been turned for this instance of Discourse
4 Likes
avanti
(Emmanuel Soyer)
4
Oh, that was it, nice find!
I was testing and couldn’t get to something, thanks for sharing. 
it works better indeed: