Skip Navigation

[Resolved] Hide Edit Cred form link

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display cred edit form link to only logged in users.

Solution:
To conditionally display content for only logged in user, you can use views [wpv-current-user] shortcode. You can check user is logged in or not:

You can find proposed solution with the following reply:
https://toolset.com/forums/topic/hide-edit-cred-form-link/#post-402133

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
=> https://toolset.com/documentation/views-shortcodes/#wpv-current-user

This support ticket is created 8 years 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 2 replies, has 2 voices.

Last updated by Daniella 8 years ago.

Assisted by: Minesh.

Author
Posts
#401979

I have a Create Content CRED form on a password protected page to create an Entertainer (CPT). Once the form is filled out, my client is redirected to the Post page that was just created. An example would be:
hidden link

My client needs to be able to edit the form in case things change. So I cloned the original form and set it to be an "Edit" form. I then added the following to the Entertainer Content Template.
[cred_link_form form='8595' form_name='Entertainment Edit' text='Edit %TITLE%' target='_self']

How can I have the link to Edit only visible to signed in users and my client?
Thanks!

#402133

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

To conditionally display content for only logged in user, you can use views [wpv-current-user] shortcode. You can check user is logged in or not:

For example:

[wpv-conditional if="('[wpv-current-user info='id']' eq '')"]
User is not logged in 
[/wpv-conditional]

Or

You can check user role. For example:

[wpv-conditional if="( '[wpv-current-user info='role']' eq 'your-role-name' )"]
 
display your content
 
[/wpv-conditional]

Where:
Replace "your-role-name" with your original role name.

More info:
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
=> https://toolset.com/documentation/views-shortcodes/#wpv-current-user

#402281

Thank you so much!

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.