You can restrict any specific page with the SureMembers plugin, however, you cannot restrict a specific piece of content without restricting the entire page. Fortunately, there is a solution that you may use to restrict a specific piece of content on your website without restricting the entire website. In this document, we’ll describe how you can achieve just that.
Step 1: Creating an access group
First, you will need to create an access group using the SureMembers plugin. If you are not sure how to do this, here is an article that will guide you through it.
Step 2: Redirecting non-members to the login page
After creating the access group you will need to select an action for other members of your sites as and when they try to access the content that is restricted to the premium members only. SureMembers gives you the option to either Redirect the members to a particular page of your choice. Follow this article to redirect the other members to the login page when they try to access content specific to the premium members.
Step 3: Display and hide specific content
You can easily restrict any content in the Gutenberg block editor by selecting the blocks you want to be made available only to certain Access Group members. Here are the steps that you will need to follow in order to restrict access to any block.
Step 1: Select the block. This will bring up the Block tab on the right-hand side.
Step 2: Navigate to “Restrict this block”
Step 3: Select the option “Show block when user” as “Is In”
Step 4: Under the Access Groups, you will see all the access groups that you have already created. Choose the appropriate group.
To show the purchase button to the non-members, you will need to select the blocks containing the purchase buttons and select the “Show Blocks When User” option as “Is Not In” and select the same membership. This will display the purchase button to only the non-members.
If you are using Elementor to write your content, you will need to click on the edit column and select the advanced option.
You will find the options to restrict content from here. You will have similar functions to choose from as the Gutenberg block editor mentioned above.