Passer la navigation

[Résolu] Custom shortcode in Elementor shortcode or text widget

This support ticket is created Il y a 4 years, 8 months. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Hong_Kong (GMT+08:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par davidH-33 Il y a 4 years, 8 months.

Assisté par: Luo Yang.

Auteur
Publications
#2192433

Thank you, the issue with error message for non-logged users has been fixed with your advice. However I noticed that the shortcode for conditional displaying based on user roles works fine only in the View. When I put this shortcode directly into Elementor shortcode or text widget it outputs 0 even on pages of items with the right custom field text value. So I'm not sure If I have to change the conditional shortcode for using it in Elementor in some way.

[wpv-conditional if="( '[check_if_allowed_by_user_role user_id='[wpv-user field='ID']' field_slug='userrolefilmonline']' eq '1' )"]
Allowed!
[/wpv-conditional]
#2192455

Hello,

Since it is a compatibility issue with other plugins (Elementor), please provide a test site with the same problem, also point out the problem page URL and where I can edit your custom PHP codes, I need a live website to test and debug it, thanks

#2192725

Recently I have found that the issue was caused by some redirect. So my issue is resolved now. Thank you!