WordPress Restricted Site Access (SAR) - How To - Customize the Message for Restricted Users With HTML


Access Restriction Message

Back to User Guide

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code. Learn more: Shortcodes - How To Use

Note: this feature was introduced in version 1.5.4 of the WordPress Restricted Site Access plugin.

You can restrict part of content and customize the message for not allowed users with HTML using special form.

Navigate to Admin Dashboard → CM Site Access Restriction Pro → Settings.

Navigation to the plugin settings - Content Control WordPress
Navigation to the plugin settings

Under the Shortcodes tab you can see the form where you can edit the message using the Denied text HTML form. Don't forget to click the Save button to save the changes.

Shortcodes settings tab - Page Restriction WordPress
Shortcodes settings tab

To restrict the content and display this message you need to use the shortcode [access] with the parameter deniedtext_html. You need also use the parameter that will define, what type of users are not allowed to see the content.

Example

The following shortcode will restrict your content and will be seen only for logged-in users, so the guest users will see the message that you put to the Denied text HTML form:

[access login="1" deniedtext_html] Here will be displayed the message from the form[/access]

Navigate to the page or post, or anything else you need to restrict, and put the opening and closing shortcodes where it's needed:

Using shortcodes to restrict content to guest users only - WordPress Restrict Content
Using shortcodes to restrict content to guest users only

Result on the Front-end:

Result on the front-end - Content Gate
Result on the front-end

Images, Videos, Forms

Images

You can add the picture to the customize message, using the button Add Media, Visual Editor or Text Editor.

Example:

Editing the shortcode message template - Content Dripping WordPress Plugin
Editing the shortcode message template

Result on the Front-end:

Result on the front-end - Tiered Membership
Result on the front-end

Videos

You can embed the video from Vimeo or Youtube using Text Editor and shortcodes for embeding <iframe></iframe>.

Example:

Embedding the video into the shortcode message - Content Control WordPress
Embedding the video into the shortcode message

Result on the Front-end:

Result on the front-end - Page Restriction WordPress
Result on the front-end

Forms

It is also possible to use the shortcodes inside of the customized message, for example, if you need to display a form.

Example:

Adding a form using the third-party plugin shortcode - WordPress Restrict Content
Adding a form using the third-party plugin shortcode

Note: this shortcode is from another plugin, it's here just for example.

Result on the Front-end:

Result on the front-end - Content Gate
Result on the front-end

Learn more about the other shortcodes that you can use with this plugin: WordPress Restricted Site Access (SAR) - Shortcodes


More information about the WordPress Restricted Site Access plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.