Tell us what you are trying to do? I need to use the IF condition as below
IF the current user's role is 'abc' then show the next code..
it's actually a URL that I am creating with multiple variables being sent as hidden link' and so on.. but I need one variable to be displayed only if a condition about the current logged in user is met.. I couldn't find documentation for this on the site.. there was some documentation on how to use the CONDITIONAL block but not how to write it raw.. some guidance would be appreciated.
Is there any documentation that you are following?
Hello. Thank you for contacting the Toolset support.
The thing is that you can add conditional display using two way:
- If you are using Blocks, you can use the conditional block to display conditional content
- if you are using classic views - you can use the [wpv-conditional] shortcode to display the conditional content.
In your case, if you are using block, you need to select the current user data and set your role and you can adjust the params for your link by adding the "Fields and Text" block within your conditional block.
Please let me know if you will require help to setup it.
Please check the following screenshot: hidden link
If you are adding "Conditional" block , then you should chose the option "Current user role" and set the static value option to compare and adjust your role value that you would like to compare. In the screenshot I'm comparing current user role with "author" role.