Skip Navigation

[Resuelto] Hi

This support ticket is created hace 9 años. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 respuestas, has 2 mensajes.

Last updated by jamesH-3 hace 9 años.

Assisted by: Waqas.

Autor
Mensajes
#263795

I am trying to show a CRED Edit link only to an administrator or a user with Confirmed membership status (which is a custom field) status.

I think I have worked out how to show only to users with confirmed membership status:
[wpv-if membershipstatuscondition="wpcf-membership-status" evaluate="$membershipstatuscondition='Confirmed'"]
[cred_link_form form="Edit Contact Details for LI Users" text="Click Here to Edit" target="_blank"]
[/wpv-if]

[wpv-if membershipstatuscondition="wpcf-membership-status" evaluate="$membershipstatuscondition='Pending'"]<bold>Unable to chnage due to Pending Membership*</bold> [/wpv-if]
[wpv-current-user info="role"]

However, this means Administrator cannot see it either. So I have used:

[wpv-if evaluate="'[wpv-current-user info="role"]'='Administrator'"]

[cred_link_form form="Edit Contact Details for LI Users" text="Click Here to Edit" target="_blank"]

[/wpv-if]

However, this does not seem to work. Can you see why it is not working?

Thanks

#263797

Waqas
Supporter

Languages: Inglés (English )

Timezone: Asia/Karachi (GMT+05:00)

Your following code works fine, however please notice that info="role" returns roles in small letters only (i.e. "administrator"). Please consider the change made below:

[wpv-if evaluate="'[wpv-current-user info="role"]'='administrator'"]

[cred_link_form form="Edit Contact Details for LI Users" text="Click Here to Edit" target="_blank"]

[/wpv-if]

Please let me know if I can help you with anything related.

#263800

Hi Waqas,
Yes, that resolved the issue.
Thanks for your quick response.

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