Home › Toolset Professional Support › [Resolved] Button using custom field not working
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 |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Tagged: Content Templates, Views plugin
Related documentation:
This topic contains 15 replies, has 2 voices.
Last updated by Noman 6 years, 5 months ago.
Assisted by: Noman.
Hi,
I tried using a custom field (in which I wrote a link) into a button but it doesn't work.
[types field='download'][/types]
hidden link
hidden link
Hi Simone,
Thank you for contacting Toolset Support.
1. Can you please share your Debug Information with us so we can see it? I have enabled debug info box for your next reply:
https://toolset.com/faq/provide-debug-information-faster-support/
2. The WP Admin link and the front-end links are password protected. I would need access details to see that page you linked to.
3. We are not able to assist your issue, without a bit of background.
i. Could you try to show to us the HTML you are using to create your Button. (preferably with code and back-end screenshots)?
ii. What you Expected to see on the front page?
iii. What you Actually see right now?
iv. It would be important to know, what should happen when a user clicks on the button, and what you saved in the Field "download", + what kind of field that is (URL, File, ?)
4. If you want to use “Download” field whose type is “File” and link this field with Button, then you can use the below code:
<a href="[types field="download"][/types] "><button class="btn btn-info btn-sm" type="button">DOWNLOAD</button></a>
You can use any class to style button with CSS as you desired.
Thank you
If you enable the form to share with you my credentials I'll explain you better what to look for
Hello Simone,
Sure thing, I have enabled the private reply box. Your next answer will be private which means only you and I have access to it.
Thank you
Hi Simone,
Thank you for sending more details. Okay I am working on it. Sorry we ran into the weekend due to which I was not able to reply.
Thank you for you patience.
Hello Simone,
I have taken a look at your setup. I noticed that you are using VC button element and then applying a link to it, shortcode links cannot be executed in that way as the link field in the VC button element only execute static URLs where as we are adding a dynamic shortcode that generates a dynamic link.
I have added the link in an alternate way and it works fine now (2nd button here):
hidden link
I have used this test.pdf link, because the download link you are using is not working directly either:
hidden link
Thank you
Hi, thanks for your support.
I tried and I succeed using custom field to generate link, now it is correct.
But I edit custom css to change the color of the button and this doesn't work.
In the inspector seems that the classes you used, generated a locked css.
Why?
Hello Simone,
The classes I used are from Visual Composer, you can override that CSS style with your own custom CSS, in that case you need to use !important with each property that you add in your CSS.
- Another approach is to add a new class in your button code, for example btn-my-custom-class like this:
<a class="vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-3d vc_btn3-icon-left vc_btn3-color-sky btn-my-custom-class" title="" href="[types field='download' raw='true'][/types]" target="_blank">
- Then write your CSS for the button style in the new btn-my-custom-class in your theme’s style.css file or Theme Options custom css section, for example:
.btn-my-custom-class { background: red !important; }
Thank you
Hi, I fear the problem is another.
I did as you told me, creating a new class and adding background color into the custom css of the model I'm editing for books.
hidden link
The problem is that maybe there is a bug, cause if I save and reload the page, all the custom css written there is deleted.
Hello Simone,
VC custom CSS option works only on Pages and Posts. To apply CSS on Content template, please add your custom CSS in theme’s style.css file.
Thank you
Could you please fix this bug in the next update?
Hello Simone.
That CSS option is basically coming from Visual Composer and is not saving CSS via ajax (like our Content Template sections do) due to which its getting lost, so I am not sure if this CSS section should exist there to add custom CSS. However, I am able to reproduce it in my WP installation and I have escalated this issue to our 2nd tier support for further review and we will get back to you.
Thank you for your co-operation and patience as we strive hard to resolve this.
Hello Simone,
Just wanted to update you that this issue is reported to developers and it will be fixed in an upcoming version, looking in our internal system I can see it says to be upcoming in Views v2.4 but we do not have any ETA on this. When exactly our developers will release an Update including the required Feature or fix is not up-to us Supporters to determine.
Each issue reported in is taken seriously into consideration.
It is given a high or low priority based on a number of factors.
Factors which those with the overview of all things related are in the best position to determine. We apologize any inconvenience this may cause.
Have a great day,
Thank you
Hi, I read this post
Will this fix the problem? do you think I should have to download this beta?
Thanks
Hi Simone,
No, please wait. Visual Composer Custom CSS issue is not fixed yet and is in process still. Once its fixed you will be able to see under Changelog and also I will try to update you as well.
Have a great weekend,
Thank you