Skip Navigation

[Resolved] In wpbakery content template: show ICON element conditionally

This support ticket is created 3 years, 10 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 20 replies, has 2 voices.

Last updated by dorianS-3 3 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1654207

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The thing is that I can not say anything without having access details as it can be anything. With the page you shared hidden link , I can see "Page Not Found" error.

To help you further I will require access details so I can see the problem or you can send me duplicator copy of your site.

More info:
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#1654213

Ah you're right it was set to private, you could not view it - sorry.
Changed it now so you can view it.

Unfortuntely I'm not allowed to provide you with a duplicate of the website.

I've now managed to show the grey twitter icon, please view: hidden link
I had to replace "return" by "echo".
It also has the correct link url href="hidden link" in the code - but the icon is not linked? Please advise.

Thank you for working through this with me.

#1654215

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You should put your span tag within the anchor tag.

For example:

<a class="vc_icon_element-link" href="'.$url.'" title="twitter" target="_self">
<span class="vc_icon_element-icon fab fa-twitter"></span>
</a>

As you can see I've added the span tag within the anchor tag.

#1654233

OK we are getting there - complicated...

Now the icons are broken - it seems like they only work when there is other icons in the template that are using the actual ICON element.
?

#1654239

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - thats correct. You need to add one ghost icon element or find a way to load the font Awesome library using your shortcode.

#1654245

I thought I had bought Toolset to make my life easier ...
Anyway, it's done now, thank you for your advise.

Cheers,
Dorian

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.