Hide page sections based on user role in Visual Composer
-
I am trying to hide certain page sections based on user role in Visual Composer by adding Custom Content Shortcode in two text blocks. The first text block is at the top of the content I want to hide to all but admins and contains:
[is role=administrator]
The second text block, at the bottom of the content I want to hide, contains the closing tag,
[/is]
This is doing what it’s supposed to and hiding the content, however, Visual Composer doesn’t seem to like it, VC shortcode winds up getting outputted to the page for logged-in admins, i.e. [/vc_column]. I can’t get it to not display the VC shortcode. It’s strange too that it only outputs the shortcode for admins.
If there is a different or better way to do what I’m trying to accomplish, I’m open to any solutions! I just want certain page sections to only be visible to admins. Thanks in advance!
- The topic ‘Hide page sections based on user role in Visual Composer’ is closed to new replies.