The content restriction allows you to restrict various levels of content on a WordPress website.
Using this feature you can bar access to a menu item, a certain section of the website, premium content, media download, and much more.
Most of the membership WordPress plugins, subscription plugins, and content restriction plugins in WordPress provide this feature.
To optimize your site with content restrictions, you can utilize ProfileGrid Memberships.
In fact, this plugin can simply be called a WordPress content restriction plugin as the content restriction is one of its core features.
Overview of Content Restriction
The WordPress content restriction plugin can help in taking complete control of your website’s content. Moreover, the plugin restricts the access of the users on pages and blog posts wherever it is enabled.
Additionally, it can also restrict other functionalities such as images, sidebars, and footer widgets, etc for specific users.
There are options to set the visibility of the content either to everyone, logged-in users, your friends, or only you.
Features of Content Restriction
Content restriction on WordPress allows you to do the following:
- ProfileGrid adds Content Restriction settings to all existing pages or posts in your dashboard.
- Restrict the logged-in/logged-out users or other users to access the website pages/posts.
- Restrict the users to access tags, media, or any other website content.
- Displays a system-generated message to the users who do not have permission to view the content.
- Redirect the users back to the home page/post who do not have permission to view the content.
- Make the website content accessible either to everyone, logged-in users, your friends, or only you.
- Restrict the visibility of sidebars or widgets to logged-in users, friends, or only you.
- Using shortcodes, restrict the visibility of content.
- Hide the content within the shortcodes for members of a specific group.
- Display the content only for group managers.
Explore more about the Content Restriction on WordPress here.
Steps to Restrict Content on your WordPress Website
Content Restriction is one of the premium features of ProfileGrid that allows you to restrict content on WordPress websites.
Once you have downloaded and installed the plugin on your WordPress website, follow the steps below:
Content Restriction Settings
Step1: Go to your WordPress Dashboard, hover the cursor over the ProfileGrid menu, and click ‘Global Settings.’
Step2: Click on Content Restrictions.
Step3: This will redirect you to the “Content Restriction” page. On this, you will find the details related to the setting options.
Note: As content restriction is a building feature of ProfileGrid, you can set restrictions directly from your posts and pages.
Setting Content Restriction on a Post
Step1: Hover your cursor over ‘Posts’ and click on ‘Add New.’
Step2: On the New Post page, scroll down and you will find ProfileGrid content restriction.
Step3: Enable the ‘Apply custom access settings?’ toggle.
Step4: Once you enable the toggle you get various options to set the availability of your content.
Step5: The first option allows everyone to access the post content.
Step6: The second option allows you to make your content accessible only to the logged-in users.
Step7: Additionally, under this setting, you can select the user group that can see the content.
Step8: Further, the next three settings are Members of Author’s Groups, Content accessible to My Friends, and Content accessible to Only Me.
Step9: Subsequently, here we have set the page title ‘Content Restriction Demo’ and published the page with ‘Content Accessible to Only Me.’
Here is how the post will display if anyone except the publisher of the post tries to access the post.
Setting Content Restriction on a Page
Step1: Hover your cursor over ‘Pages’ and click on ‘Add New.’
Step2: Scroll down and you will find the same setting options.
Step3: The rest of the settings for pages are exactly the same as posts.
Step4: For example, we have kept the title of the page as ‘Demo Page Content Restriction Setting.’
Step5: Next we have published the page with ‘Content accessible to Logged In Users.’ And the group selected is ‘Media Group.’
Step6: Here is how the page will look if anyone except the logged-in users of Media Group tries to access the page.
Setting Partial Content Restrictions with Shortcodes
Step1: Go to your WordPress dashboard, hover your cursor over ProfileGrid left menu, and click on ‘Shortcodes.’
Step2: On the Shortcodes page, you will find three codes to restrict content. Namely, Conditional Content Display, Conditional Content Hide, and Content Restricted to Group Managers.
The Conditional Content Display shortcode can be used to restrict the visibility of the content between the codes for all users of a specific group.
The Conditional Content Hide is used to hide the content within the shortcodes from the members of multiple groups using multiple ‘Group IDs’.
And the Content Restricted to Group Managers restricts all the group managers from accessing the content within the shortcodes.
Setting Up Conditional Content Display
Using this shortcode, you can bar a particular group to access the content and allow the rest of the groups to access that content.
By entering the ‘group ID’ of the particular group, you can hide the content from that specific group. This feature can come in handy if you wish to publish group-specific content on your website.
Here, as an example, we are using a ‘demo account’ to showcase this.
Step1: Copy the Conditional Content Display shortcode.
Step2: Create a new post or you can edit your previous pages or posts.
Step3: Paste the first half of the shortcode at the beginning of the content and the second half at the end of the content.
Note: Any content between the first half and second half of the shortcodes will be hidden from the specified group. You can use this shortcode to hide particular sections of the page or a post.
Step4: In this shortcode [profilegrid_show gid=”x”] the “x” stands for the group ID. A group ID or ‘gid’ is a unique ID number assigned to every ProfileGrid group. You can find the ‘gid’ on the Group Manager page, below every group.
Here is an example:
Here the gid of the Marketing group is 10.
Step5: So to bar the group members of the Marketing Group, we will replace the “x” with “10”.
Step6: Publish or Update the content.
Frontend Examples of Conditional Content Display
Example 1: Here is how the content looks when a member of ‘Marketing Group’ opens the post.
The content within the shortcodes is hidden from the member of the ‘Marketing Group.’
Example 2: Here is how the content looks when a member from any other group opens the post.
The content within the Shortcodes is visible to the members of other groups.
Setting Up Conditional Content Hide
The Conditional Content Hide shortcode is used to hide the content between the shortcodes from multiple groups. You can bar members of more than one group from accessing the content.
Here, is an example:
Step1: Copy the Conditional Content Hide shortcode.
Step2: Create a post/page or edit an existing post/page and paste the first half of the shortcode at the beginning of the content and the second half and the end of the content.
Step3: Replace the ‘x,y,z’ from [profilegrid_hide gid=”x,y,z”] with the group IDs and publish the post.
Here we have replaced ‘x,y,z’ with ‘1o,9,7.’ Which are the group IDs for Marketing Group, Media Group, and Bloggers Group.
It will hide the content inside the codes from all the group members of these groups.
Note: Any content between the first half and second half of the shortcodes will be hidden from the specified groups. You can use this shortcode to hide particular sections of the page or a post from multiple groups.
Frontend Examples of Conditional Content Hide
Example 1: This is how the post would look on the front end if users from Marketing Group, Media Group, and Bloggers Group open the post.
Here the content within the Shortcodes is hidden from all the members of the specified groups.
Example 2: Here is how the post will appear for the rest of the groups.
The content within the Shortcodes is visible to the members of other groups.
Setting Up Content Restricted to Group Managers
This Shortcode enables you to restrict all the group managers from accessing the content. It does not require you to specify the group IDs as it is applicable to all the groups.
It can be used to display special discount codes, information, disclaimer, notice, and more, only for the members of the groups and hide it from the group managers.
Here, is an example:
Step1: Copy the Content Restricted to Group Managers shortcode.
Step2: In any post or page (can be new or existing), paste the first half of the shortcode at the beginning of the content and the second half and the end of the content.
Step3: Here you do not need to specify any group or groups.
Note: Any content between the first half and second half of the shortcodes will be hidden from the group managers of all groups. You can use this shortcode to hide particular sections of the page or a post from all group managers.
Frontend Examples of Content Restricted to Group Managers
Example 1: Publish the post and this is how it would look on the front end if any group manager from any group opens the post.
Here the content within the shortcodes is hidden from all the group managers.
Example 2: Here is how it would look if any other user from any group opens the post.
Here the content is visible for all the other group members except group managers.
You can also explore other advanced Content Restriction features of ProfileGrid Memberships, in the additional resources listed below.
ProfileGrid Memberships allows you to set restrictions on your website menus, pages, posts, blogs, and categories. Furthermore, using the content restriction feature, you can easily prohibit users to access your website content.
This plugin is a complete solution for your memberships, subscriptions & content restriction needs. Comment below if you need further assistance in setting up content restrictions on your website. Our experts will reach out to you with the best solutions.