Skip Navigation

[Resolved] Access shortcode not working for new created user role

This support ticket is created 3 years, 10 months 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by pedro.S 3 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1668605

I created a user role with the name "GeneralPublicWithoutLogin" and set to inherit permissions from Guest.

I added the shortcode on the page with some content, actually it's on the theme customizer because the content is in the header:

[toolset_access role="GeneralPublicWithoutLogin" operator="allow"]<a href="">Login</a><span style="color:#ccc">   |   </span><a href="">Register</a>
[/toolset_access]

I went to another browser and it's not visible dispite i'm not logged in, actually logged in or not it does not show the content.
If i rename role to "Guest" it works because i can see the content in the non-loggedin browser.

What am i doing wrong?

#1668755

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pedro,

Thank you for getting in touch.

I suspected that because the user's are "Guests" then they are automatically picked up as Guests by wordpress. When you create a custom role "GeneralPublicWithoutLogin", it is expecting that the user is assigned that role under their profile. However Guest users do not have a profile, hence wordpress defaults to the Guests role.

Please let me know if this clarifies the issue for you.

Thanks,
Shane

#1668981

My issue is resolved now. Thank you!

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