[Resolved] Use a conditional statement to show content if a field contains the current user
This support ticket is created 3 years, 8 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.
Use a conditional statement to show content if a field contains the current user id. I've been testing to the wpv_contains functions found in support that doesn't seem to be responding.
Is there any documentation that you are following?
Then on the test page I'm testing the shortcode with
[wpv-conditional if="( '[wpv_contains haystack='testing' needle='test']' ne 'false' )"]
test output[/wpv-conditional]
[wpv-conditional if="( '[wpv_contains haystack='testing' needle='test']' ne '0' )"]
test output[/wpv-conditional]
[wpv-conditional if="( '[wpv_contains haystack='testing' needle='test']' ne '1' )"]
test output[/wpv-conditional]
[wpv-conditional if="( '[wpv_contains haystack='testing' needle='test']' ne 'true' )"]
test output[/wpv-conditional]
I get nothing as a result of any of these.
What is the link to your site?
hidden link <- This page has the shortcodes on it.
Hello. Thank you for contacting the Toolset support.
Well - view's offers the conditional shortcode [wpv-conditional] and with that we offer the CONTAINS() function to test if string contains the part of the string you pass or not.