Skip Navigation

[Closed] Show a link but only to logged in users who have filled in their company details

This support ticket is created 4 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1884937

Tell us what you are trying to do?

I want to show a link on my site, but only to users who have created an account (and are logged in) & have entered their 'company details'. Those 'company details' are a custom post type that I created separately.

I now have a toolset access conditional code that can see if a user is logged in or not. And then for the logged in users, I would like to have a nested conditional code that can see if a user has filled in all of their company details.

the conditional code I now have looks like this:

[wpv-conditional if="('[wpv-current-user info='wpcf-btw-nummer-fact'']' eq '')"]Please fill in company details[/wpv-conditional]
[wpv-conditional if="('[wpv-current-user info='wpcf-btw-nummer-fact'']' ne '')"]Show link[/wpv-conditional]

#1885137

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

To check the custom user field value, you should use the shortcode [wpv-user field='wpcf-btw-nummer-fact']:

So, the conditional statement would be:

[wpv-conditional if="('[wpv-user field='wpcf-btw-nummer-fact']' eq '')"]
Please fill in company details
[/wpv-conditional]

[wpv-conditional if="('[wpv-user field='wpcf-btw-nummer-fact']' ne '')"]
Show link
[/wpv-conditional]

More info:
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154505

Can you please share where exactly you stuck and needs help.

The topic ‘[Closed] Show a link but only to logged in users who have filled in their company details’ is closed to new replies.