Tell us what you are trying to do?
I am trying to nest 2 conditional outputs and need help to check that the code is working correctly.
What I am trying to accomplish is for the _direction_event to show only if the User is Logged In AND the field is not empty. If the field is empty, then nothing would show. If the User is not logged in, then there will be a message asking to log in.
The code below is showing both the address and the non user log in message so not working - see screenshot.
[wpv-conditional if="( '[wpv-current-user info='logged_in']' eq 'false' )"]
Please register and sign-in to view venue details.
[/wpv-conditional]
[wpv-conditional if="( '[wpv-post-field name='_direction_event']' ne '' )"]
[wpv-post-field name='_direction_event']
[/wpv-conditional]
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/views/conditional-html-output-in-views/#syntax
Is there a similar example that we can see? no
What is the link to your site? hidden link
Hello, I tried using AND statements and this is the new code - can you please tell me if it works?
[wpv-conditional if="( '[wpv-current-user info='logged_in']' eq 'true' )" AND ( '[wpv-post-field name='_direction_event']' ne '' )] [wpv-post-field name='_direction_event'][/wpv-conditional]
[wpv-conditional if="( '[wpv-current-user info='logged_in']' eq 'false' )" AND
( '[wpv-post-field name='_direction_event']' ne '' )] Please register and sign-in to view venue details.
[/wpv-conditional]
My issue is resolved now. Thank you!