Access Control for Contents Inside Page Content

Access lets you control who can read specific texts inside page content. This way, you can place texts that only certain user kinds can see, or are hidden from certain user types.

When you edit content, you will see the Access logo. Click on it and you will see the following dialog:

Conditional shortcode dialog
Conditional shortcode dialog

First, choose the roles who we want to control. You will see all the standard WordPress roles and any roles that you created with Access. Next, enter the text that you want to display conditionally. The dialog box only lets you insert plain text. After you insert this text, you can edit shortcodes. We’ll see this next. At the bottom of the dialog, you can control if only members with these roles or everyone except them will see the text. Once you’ve inserted the conditionally-displayed text, you will see the Access shortcode in the page content:

Access control in the WordPress content editor
Access control in the WordPress content editor

Whatever is inside the toolset_access shortcode will only display, or be hidden, for the selected roles. You can place the cursor inside it and add any other WordPress elements (galleries, forms, Views and whatever comes to mind).

Originally written
May 8, 2014
Updated
June 26, 2020