How to place dynamic data field into a link?

I’m trying to create a button, that I will place into the post template and will always link to the post’s category. There are a lot of posts and categories, so the idea is to compose the link dynamically.

The link I’m looking for is already in place. I can use “{post_terms_category}” field, that will create an ahref linking to the place I need.

The problem is, the dynamic data field “{}” already is a link. So when I try to put it into my button, it will produce a link inside a link. Which does not work.

Any ideas? :slight_smile: I’m thinking of placing it as a plain text, style it as a button and then create a jsc function that will change text of the link for me. But I hope there is some other simple way…

1 Like

Try this:

{post_terms_category:plain}

Info from here:

Cheers

Patric

1 Like

Thank you for the tip. Sadly, it altered the URL address itself, so it didn’t work for my case.

I also tried to add this filter as a php snippet, but nope.

I ended up adding custom class and made custom javascript function to alter the text for me.