Using a shortcode to populate a link's URL in a buttton

Hi
I am using the Booster wcj_product_url product_id short code (see here) to create a link to a specific woo product.
Looks like this; https://www.screencast.com/t/uBxvKBk3qG

Please let me know if this is supported, and if not how to create a button that will autoupdate it’s URL based on the product Id for a woo commerce product.

Thanks!

Hi @flashfog,

Thanks for reaching out.
Regretfully, the mentioned plugin is not supported by the theme, alternatively, you can use the Dynamic Content feature to add the specific WooCommerce product URL by the product id.
The sample dynamic shortcode will look like this {{dc:post:permalink post=“your product_id”}}. Please find the screenshot explaining the option.

Thanks

Ok, thanks . It would be amazing if booster was one of the plugins included with X. It solved with one simple shortcode what I was trying to accomplish (and unable to) in this post.

re: this link; I replaced the URL with {{dc:post:permalink post=“15890”}} but it did not work. I am including login instructions: please take a look.

There is an update, it turns out {{dc:post:permalink post=“15890”}} always evaluates as the current URL?

Hi @flashfog,

It seems that the dynamic content tag is prefixed with the # tag which is referencing the current URL. The current code might be looking like this now #{{dc:post:permalink post=“15890”}}, you need to remove the #.

Hope it helps.
Thanks

I think there is more here. Login details to follow

Hi @flashfog,

Thank you for providing the credentials. I checked your button setup and you had pretty quotes in the dynamic content shortcode, I went ahead and fixed it, now your button links correctly:

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

Instead of copying and pasting I’d recommend you to generate the shortcode via dynamic content (see screenshot)

image

To learn more about Dynamic Content please see https://theme.co/docs/work-with-dynamic-content

Cheers!

wow I would have never have caught that! good eye! really hard to track since it does not throw an error, but an unexpected behaviour (to create an URL link for the current page).

I assume these were put in by the text editor as some kind of automated favour. THANK YOU

Hi @flashfog,

Glad to help you. Have a nice day.

Thanks

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