Permalink shortcode in buttons

Hi!

I usually work with permalink instead hardcoding URLs in my buttons. I’ve just found that if I put a shortcode for any page inside the Button link, it doesn’t work. I’m working in a local environment, and when I migrate to the final host I don’t want to change all the links (that’s the reason I use permalinks).

There is a way for doing it without replacing the buttons for pure HTML? Thanks.

Hi Nestor,

The button element is meant to take text values which might be the reason why the shortcode you are trying to use is not working.

However, I am not certain if this is the case. What kind of shortcode are you trying to use in the button element and what does it supposed to output?

Thank you.

Hi!

I want to put something like this [permalink id=“post_id”]

Hello Nestor,

The shortcode will not work. Please can utilize the dynamic content instead.
You can insert this:

{{dc:post:permalink post="1"}}

Just make sure that you add the correct ID where you want it to link to.

Best Regards.

1 Like

That’s what I was looking for. Thank you very much!!

You’re welcome!
We’re glad we were able to help you out.

1 Like

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