If you want to selectively protect or hide specific sections of a post or page, the free Simple Membership Partial Protection addon is the perfect solution. This addon allows you to create engaging teaser content by displaying part of the page content for free, while keeping the remaining content accessible only to members.
Table of Contents
- Partial/Section Protection Example
- Download the Partial Protection Addon
- Install the Addon
- Using the Partial Protection Addon
- Simple Partial Protection Example
- Partial Protection for Specific Membership Level(s)
- Partial Protection with Protected Message Formatted Nicely
- Partial Protection for a Specific Member
- Partial Protection for Specific Members
- Partial Protection for Anyone Who is Logged-in
- Section Protection for Anyone Who is NOT Logged-in
- Partial Protection for Expired Members Only
- Partial Protection for Active Members Only
- Partial Protection Not For Specific Membership Level
- Partial Protection without the “Content is protected” Message
- Partial Protection without the Protected or Renewal Message
- Using a Custom Message for the Non Members
- Partial Protection Custom Message with HTML Link
- Partial Protection for Gutenberg Blocks
- Important Notes
- Explore All Addons/Extensions
Partial/Section Protection Example
The following screenshot shows an example of how a partially protected post/page may look like:

Download the Partial Protection Addon
Download the free Simple Membership Partial Protection addon.
Install the Addon
- Click on the Add New menu under the plugins interface.
- Go to the Uploader tab and upload the swpm-partial-protection.zip file.
- Hit the Install Now button and then activate the addon.
Using the Partial Protection Addon
This addon comes with a shortcode that you can use to wrap the content that you want to protect or hide.
Go through the following shortcode examples. It will show you how you can use this partial/section protection shortcode.
Note: When you copy and paste the shortcode, make sure to paste it in the Text mode of the page editor to prevent any HTML code from getting copied.
Simple Partial Protection Example
[swpm_protected] Whatever content goes here is only visible to logged-in members who have access to this post or page. [/swpm_protected]
Partial Protection for Specific Membership Level(s)
[swpm_protected for="2-3-4"] Whatever content goes here is only visible to members who belong to the specific membership level(s) specified in the shortcode. [/swpm_protected]
Where 2,3,4 are the membership level IDs that you want to allow access to this section of content.
Partial Protection with Protected Message Formatted Nicely
The content protection message is shown in plain text without any styling by default. This is so you can define your own custom CSS styling if you wanted to.
You can specify the format_protected_msg=1 parameter in the shortcode to tell the addon to output a nicely formatted protection message. This parameter can be used in any of the shortcodes explained in this page.
Below is an example:
[swpm_protected for="2" format_protected_msg="1"] Whatever content goes here is only visible to members who belong to the membership level 2. [/swpm_protected]
It will produce a formatted protection message like the one shown below:

Partial Protection for a Specific Member
[swpm_protected member_id="1"] Whatever content goes here is only visible to the member whose Member ID is 1. [/swpm_protected]
Partial Protection for Specific Members
[swpm_protected member_id="10,15,16"] This content is only visible to members with Member IDs 10, 15, or 16. [/swpm_protected]
Partial Protection for Anyone Who is Logged-in
If you want to just protect a section of a post or page for logged-in members (it doesn’t matter if the member’s account status is expired or not) then use the following shortcode:
[swpm_protected visible_to="logged_in_users_only"] Whatever content goes here is only visible to anyone who is logged-into the SWPM system as a user (doesn't matter if his account is expired or not). [/swpm_protected]
Section Protection for Anyone Who is NOT Logged-in
If you want to just protect a section of a post or page for non logged members (only anonymous visitors will see this section) then use the following shortcode (can be useful if you only want to show a message to the anonymous users):
[swpm_protected visible_to="not_logged_in_users_only"] Whatever content goes here is only visible to a non logged user (anonymous visitors of your site will see this message). [/swpm_protected]
Partial Protection for Expired Members Only
If you want to protect a section of a page for expired members (only expired members will see the content) then use the following shortcode:
[swpm_protected account_status="expired"] Only the expired members will be able to see this message. [/swpm_protected]
If you want to protect a section of a page for expired members of a particular level then use the following shortcode:
[swpm_protected account_status="expired" for="2"] Only the expired members from membership level 2 will be able to see this message. [/swpm_protected]
Partial Protection for Active Members Only
[swpm_protected account_status="active"] Only the active members will be able to see this message. [/swpm_protected]
Partial Protection Not For Specific Membership Level
If you want to protect a section and make it NOT visible to a particular membership level then use the following shortcode:
[swpm_protected not_for="2"] Whatever content goes here is NOT visible to members of membership level 2. All the other members can see this content. [/swpm_protected]
Partial Protection without the “Content is protected” Message
If you want to protect a section of a page without showing the “Content is protected” message to the non logged-in users then use the following shortcode (this is useful if you don’t even want them to know that there is a section of content there):
[swpm_protected for="2-3" do_not_show_protected_msg="1"] Whatever content goes here is only visible to members who belong to the specific membership level specified in the shortcode. Also, the users who do not have access to this content won't see a "Content is protected" message. [/swpm_protected]
Partial Protection without the Protected or Renewal Message
The following section protection option protects the section without showing the “Content is protected” or “Renew your account” message (this is useful if you don’t even want them to know that there is a section of content there):
[swpm_protected for="2-3" do_not_show_protected_msg="1" do_not_show_expired_msg="1"] Whatever content goes here is only visible to members who belong to the specified membership level. Users who do not have access to this content won't see a "Content is protected" message. The expired members won't see the renewal message either. [/swpm_protected]
Using a Custom Message for the Non Members
This section protection shortcode can take another extra optional argument which can help you customize the text/message that is shown to non members. Here is an example:
[swpm_protected for="2-3" custom_msg="This is a custom protection message"] This content is restricted to members with membership levels 2 or 3. If the user does not have the necessary permissions, the custom message will be displayed. [/swpm_protected]
Partial Protection Custom Message with HTML Link
You can use a HTML link in the custom message that you specify for the section protection shortcode. Remember to switch to the “Text” mode in the WordPress post/page editor if you are typing in HTML link code. Here is an example:
[swpm_protected for="2-3" custom_msg='This is a <a href="https://www.example.com">test link</a> in the message'] This content is restricted to members with membership levels 2 or 3. If the user does not have the necessary permissions, the custom message with link will be displayed. [/swpm_protected]
Partial Protection for Gutenberg Blocks
You can use the partial protection on Gutenberg blocks also. Wrap the block that you want to protect with the start and end of the partial protection shortcode.
The following is an example showing how the image/media block is protected using the partial protection shortcode:

Important Notes
Note 1: When using partial protection on a post or page, do not protect the full post or the category it belongs to. When category protection is applied, all posts in that category are fully protected, which overrides any other protection settings on the individual post.
Note 2: From version 2.0 of this addon, the ‘account_status’ parameter has been introduced. If you previously used the ‘expired’ status within the ‘visible_to’ parameter, please update your shortcode to use the ‘expired’ status in the ‘account_status’ parameter instead.
Explore All Addons/Extensions
To view all available addons for the Simple Membership plugin, visit the Addons Page.