Can't create a <a href link using AFC Custom Field data - missing something

PROBLEM: I can’t make a link using dynamic data from a custom field related to the post. It makes it into a SPAN
QUESTION: This should be super simple, what am I missing?

I have a looper that gets the AFC dynamic data from a URL field attached to a post.

This is what I’m trying to do…
ELEMENT: Text
CONTENT:
<a href='{{dc:acf:post_field field="map_url"}}' target='_blank' style='color:rgb(47, 159, 233)'>{{dc:acf:post_field field="address"}}, {{dc:acf:post_field field="zip"}} {{dc:acf:post_field field="village"}}</a>

OUTPUT: <span style='color:rgb(47, 159, 233)'>Via Roma, 8, 25030 Paratico</span>

(Exactly the same with RAW HTML Element)

ELEMENT: Headline
CONTENT:

{{dc:acf:post_field field="address"}}, {{dc:acf:post_field field="zip"}} {{dc:acf:post_field field="village"}}

LINK: {{dc:acf:post_field field="map_url"}}

OUTPUT:

<h6 class="x-text-content-text-primary">Via Roma, 8, 25030 Paratico</h6>


What am I missing?!

Hello @marcuszacco,

Thanks for writing to us.

It seems that you have set the Row default tag as an anchor tag, please note that you can not have multiple anchor tags inside the anchor tag.

I would suggest you set the Row base tag as DIV and then check it

Hope it helps
Thanks

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.