Skip Navigation

[Resolved] Hide info depending on user role (using divi)

This support ticket is created 4 years, 8 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
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)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1310489

I am trying to hide areas on the page depending on the user role is this possible?

Thanks

#1310503

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.

#1310669

That is really annoying. Can it be done by CSS at all?

#1310701

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.

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