Home › Toolset Professional Support › [Resolved] Hide info depending on user role (using divi)
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
Related documentation:
This topic contains 3 replies, has 2 voices.
Last updated by Christian Cox 5 years, 6 months ago.
Assisted by: Christian Cox.
I am trying to hide areas on the page depending on the user role is this possible?
Thanks
Hi, you can use Access Control shortcodes inside any text editor area to manage visibility of site contents based on User role. We have information about those shortcodes available here:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
Unfortunately there is not a tight integration with the Divi builder, so it's not possible to manage the display of Divi blocks in the builder using Access Control. The shortcodes must be applied to content shown in a text editor for best results.
That is really annoying. Can it be done by CSS at all?
In theory yes, but the same integration challenges exist for a CSS approach. You would probably have to apply different CSS classes to some content, based on a User's role. Again, there's no integration with the Divi Builder so you can't conditionally apply CSS classes to some block in the Divi builder. You would have to insert Access Control shortcodes in a text editor somewhere to moderate the classes applied to an HTML element.