Skip Navigation

[Resolved] if statement with shortcode not working

This support ticket is created 7 years, 4 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 3 replies, has 2 voices.

Last updated by Noman 7 years, 4 months ago.

Assisted by: Noman.

Author
Posts
#549459

I am trying to:
I have the following if statement

[wpv-conditional if="('[wpv-can-i-review-user Reviewed='[wpv-being-reviewed]']' eq '3' )"]

when I display this part of it on its own it returns 3
[wpv-can-i-review-user Reviewed='[wpv-being-reviewed]']

However then I put it in the if statement it never give a true result.

Please help as going mad with this one

I visited this URL:

I expected to see:

Instead, I got:

#549490

Noman
Supporter

Languages: English (English )

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

Register_Custom_Shortcode & Function.png

Hi Oliver,

Thank you for contacting Toolset Support. Can you please make sure to Register the custom shortcodes & function first in Toolset >> Settings >> Front-end Content >> Third-party shortcode arguments (see attached screenshot).

And see if it works then?

Thank you

#549629

I am using 2 shortcodes and they are both registered. I registered this wpv-can-i-review-user Reviewed and wpv-being-reviewed as shortcodes
Please advise as this is really annoying

#549783

Noman
Supporter

Languages: English (English )

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

Hello,

Please try the shortcode without single quotes and small letters:

[wpv-conditional if="('[wpv-can-i-review-user reviewed=[wpv-being-reviewed]]' eq '3' )"]

If above does not solve the issue, then I would need to request temporary website WP-admin and FTP info for your site to debug further and to help in resolving this. Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. Thank you

✙ Please add the Link to the [View] Edit Screen and [Page] Edit Screen where you have inserted this view.

Thank you