I am building a website where users have the possibility to create a personal profile. This personal profile is a custom post type created via Toolset.
In their "Account" page, I want to display a link to create their personal profile if they haven't created one already. If they have created one however, I want to hide the link.
I have tried to come up with some conditional statement that would let me do this, but so far I haven't had luck.
I am relatively new to Toolset so maybe I am missing something, but any assistance on how to achieve that would be very welcome!
Thank you for contacting Toolset support. Can you please provide more info that:
1. “Personal profiles” is a custom post type and every user can create only 1 profile (post) right?
2. User can only see “create their profile link” after getting logged in right?
==> Whereas 'student' will need to be replaced with your post_type slug.
2. Register shortcode & function first ‘check_user_profile_exist’ in Toolset >> Settings >> Front-end Content >> Third-party shortcode arguments. And also in >> Functions inside conditional evaluations section -- screenshot attached.
3. Then you can use shortcode in the View like this:
[wpv-conditional if="( '[check_user_profile_exist]' eq true )"]
Link goes here
[/wpv-conditional]