I have a custom user field and I would like to compare the value from the current user with the post-id of the current post in a conditional statement.
[code]
[types usermeta='member-employer-connection' current_user='true'][/types] - [wpv-post-id]
[wpv-conditional if="( '[types usermeta='member-employer-connection' current_user='true'][/types]' eq '[wpv-post-id]' )"]
They are the same
[/wpv-conditional]
[/code]
The first line just shows the value of the custom user field for the current user and the current post's id so I can see if they're the same.
I based what I'm doing off a post by Minesh here: https://toolset.com/forums/topic/conditional-display-based-on-custom-user-field/
I have a user loop where I used Minesh's code to see if the user field was empty or not and that worked fine.
Now I want to see if the custom user field for the currently logged in user matches the post id of the currently viewed post.
In my conditional statement, I had a form that my test user did not have access to. I changed the access on the form and it worked 🙂