Skip Navigation

[Resolved] Use custom custom field content (url) as url link in visual composer button

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to get the URL only from a link field without it being wrapped in an anchor tag.

Solution:

This can actually by done by using the output='raw' attribute.
[types field='pdf' output='raw'][/types]

This shortcode will only display the url of what was stored in the field so that you can add it to you html tags like this.

This support ticket is created 5 years, 9 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 3 replies, has 2 voices.

Last updated by xaviP-2 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1220091

Hello 🙂
I need help to obtain a shortcode of custom field, which i can put in WPBakery Page Builder (or in elsewhere i need)

At the moment I only obtain the url of the pdf uploaded. It's good obtion but it's not eyecandy. I prefer to show a button instead the url.

Tell us what you are trying to do?
I use custom field to upload a pdf. I want to use WPBakery Page Builder buttons to open that pdf.
I tried to put a shortcode to obtain the content returned from my custom field (an url) in the url field of a visual composer module. A button module. but it's not working.
I searched at internet and here, in the support tickets... but i haven't got luky. I found an option to create manually a button... but it didn't work very well...

Is there any documentation that you are following?
To do what i need, the answer is NO.
I found something to an option mentioned before: create manually my own button, but the result was not the desired. And not's exactly what i need.
https://toolset.com/forums/topic/visual-composer-button-in-content-template-doesnt-show-right-link/

Is there a similar example that we can see?
Mmm... i'm not sure
I need a button to open my pdf in an other window or in a popup.
You can see a simple example in hidden link

What is the link to your site?
It's still in development.
I can create an user for you to take a look if you want.

Thanks in advance,

🙂

#1220347

Shane
Supporter

Languages: English (English )

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

Hi Xavi,

Thank you for contacting our support forum.

It could be that you're not using the Correct classes.

Is there an example that you have of the actual button you want ?

Please let me know.
Thanks,
Shane

#1222012

Hello Shane,

Thanks for your time.

I finally understood how can I use obtained url.
I forced 'raw', then i've could use as principal image, and make popup, etc.
All Whatever i want.

At the moment i'm using with pdf viewer
You can see here: hidden link

Best regards!

#1222014

My issue is resolved now. Thank you!
for people who may need something like this.
This is how I solved the problem; adding: output='raw'
the complete shortcode: [pdf-embedder url="{!{types field='pdf' output='raw'}!}{!{/types}!}"]