Skip Navigation

[Resolved] I want to link a elementor button to WC product but it should be dynamic

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Shane 4 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1639913

Tell us what you are trying to do?
I am creating a template in Elementor in which I am fetching the details from a Post, I created CPT and created CFs as well and I added the product link in that post but I am not able to use that link on the template to link it on the button.
Is there any documentation that you are following?
I tried URL field to link the product and I am able to link it on the Post but I am not able to get that link on the button in the frontend.
Is there a similar example that we can see?
reference link - hidden link
it has Back This Business button and it goes to the product page dynamically. I am trying to create something similar when anyone clicks on Back This Business button it should go to the product dynamically.
What is the link to your site?
hidden link and the test link is - hidden link

#1640331

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Justin,

Thank you for getting in touch.

For clarity, you have the link for the Product stored in a custom field on your Post and you want to load that link dynamically in your Elementor button correct?

You can try seeing if Elementor has a dynamic content button to add the url to that button. Have a look at the link below for further details.
hidden link

Thanks,
Shane

#1641279

Hello Shane,

Thank you for your reply.

Yes, that's correct I want to link the button to the custom field. I have checked the given link but it doesn't have the button option?

is there any other way I can do it?

#1641391

Hello Shane,

Does toolset provide an option for the dynamic button field? I need a button field in the Toolset.

#1642059

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-05-28 at 1.10.14 PM.png

Hi Justin,

We do not provide a dynamic button field, what we have is a Button block that can be used to pull dynamic data from your post. See Screenshot

If the button doesn't have the option then you will need to construct your button manually using HTML and CSS.

Are you aware of how to create a link using HTML and css ?

You will then need to style this link to look like a button given that the elementor button widget doesn't allow for dynamic URL.

Thanks,
Shane

#1643201
2.jpg
1.PNG

Hello Shane,

Thank you for your assistance.

I thought to do that as well so I created a link field and tried to fetch the link in the elementor by using the text editor but when I choose for the dynamic content and try to select the link field it doesn't show in the key dropdown. find attachements.

Can you please let me know how can I fetch the URL in the text editor or I can use any other option? I tried https://toolset.com/documentation/customizing-sites-using-php/functions/#url this option but it is only fetching some text value.

Thanks in advance.

#1646687

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Justin,

Not sure why its not showing up as the Elementor document states that this field is compatible.

However you should be able to manually get the field by using this should below.
[types field="my-link"][/types]

Where you will replace the "my-link" with the slug of your field.

Thanks,
Shane