Skip Navigation

[Resolved] conditional statement

This support ticket is created 4 years, 1 month 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 4 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1527493

*edit* Oh, hold up. I've got a function to add PHP to widgets, now I'm working on this. Will get back a.s.a.p.

I want the icon to show only when the field is filled.

It works great in the post, but I need to make it work in a widget. Is this possible?

'<ul class="icon-box-mobile">

  • <span class="titlex">[wpv-conditional if="( $(wpcf-facebook) ne '' )"]<a href="[types field='facebook' output='raw'][/types]" target="_blank" rel="noopener noreferrer"><i class="fab fa-facebook-f" aria-hidden="true"></a></span>
  • [/wpv-conditional]

  • [wpv-conditional if="( $(wpcf-instagram) ne '' )"]<a href="[types field='instagram' output='raw'][/types]" target="_blank" rel="noopener noreferrer"><i class="fab fa-instagram" aria-hidden="true"></a>
  • [/wpv-conditional]
    '

    #1527979

    Waqar
    Supporter

    Languages: English (English )

    Timezone: Asia/Karachi (GMT+05:00)

    Hi,

    Thank you for contacting us and I'd be happy to assist.

    To troubleshoot this, I'll need to see exactly how and where you're planning to use these conditional blocks in the widget.

    Can you please share temporary admin login details, along with the information about the widget where this conditional block is not working?

    Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

    regards,
    Waqar

    #1534929

    Waqar
    Supporter

    Languages: English (English )

    Timezone: Asia/Karachi (GMT+05:00)

    Thank you for sharing the admin access and I'll wait to hear back from you around the specifics.

    Note: I've set your next reply as private too.

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