Private Tags are an effective way to hide messages on a page or post and only display the messages to selected members. A Reverse Private Tag has similar functionality except the messages cannot be seen by the selected members. These two options allow you to communicate with your members in a way that is more customized based on their level of access. These tags also provide you with the ability to show a message stating the content is only available for specific members.
A Private Tag can be inserted anywhere in the content section of a WordPress page or post. This is because a Private Tag does not need to be added to through the HTML code of a page or post since WordPress will automatically recognize its format and will act accordingly. This means you can use Private Tags (or Reverse Private Tags) to easily display specific sections of content to different sets of users.
As an example, you can add a message you only want members within certain membership levels to view by placing that message inside a Private Tag and adding the Private Tag to a page. Anything within that Private Tag can only be seen by the members with the appropriate membership level(s).
Private Tags or Reverse Private Tags can be manually typed into the content section of a WordPress post or page. Or, they can be inserted using the Gutenberg Editor and the WishList Member Mergecode and Shortcode inserter.
Another option to generate and copy a shortcode or mergecode is by using the Shortcode Creator found on the WishList Member Dashboard.
—
Once you click the icon on the WishList Member dashboard, the Shortcode Creator popup appears and can be used at any time to create a WishList Member Shortcode or Mergecode which can then be copied and pasted as needed. The Private Tags option appears in the Shortcodes menu.
—
Private Tag Example
The example below shows a Private Tag for a membership level named Gold with This content is for Gold Members Only set as the content only accessible to members assigned to the Gold level.
[wlm_private “Gold”]This content is for Gold Members Only[/wlm_private]
You can manually edit that Private Tag based on your membership level name and content you want to include within the Private Tag.
—
The WishList Member Mergecode and Shortcode inserter option appears when using the Classic Block of the Gutenberg editor on pages and posts. You can click the blue WishList Member icon and the menu to create a Mergecode or Shortcode will appear.
—
Once you click the blue WishList Member code inserter icon, you can select Shortcodes > Private Tags and follow the steps.
—
The Shortcodes Creator > Private Tags popup appears and you can select the membership level(s) that will be able to view the protected content within the Private Tag and add the content to appear within the Private Tag.
The Private Tag will be generated based on your selections and will be displayed in the Shortcode Preview section.
Then click the Insert Shortcode button to insert it into the page or post.
The screenshot example below shows a Private Tag that will display the message “This content is for Gold Members Only” to members in the Gold level.
—
Multiple Levels in a Private Tag
More than one level can be added to a Private Tag or Reverse Private Tag. This allows for multiple levels to be handled by the same tag. The screenshot example below shows a Private Tag that will allow members in the Silver and Bronze levels to view the message in the Private Tag.
—
Text to Display for Content Protected with Private Tags and Reverse Private Tags
Text can be displayed to the users who do not have access to the content within the Private Tag. This text can be edited in the Advanced Options > Global Defaults > Other section of WishList Member.
—
Reverse Private Tags
Content within a Reverse Private Tag cannot be viewed by members of the membership level(s) included in the Reverse Private Tag.
[!wlm_private “Silver”]This content is not for Silver Members.[/!wlm_private]
You can check the Reverse Private Tag box and select the membership level(s) to include in the tag. Then you can add the content in the Content section that you don't want the membership level(s) to see.
The screenshot example below shows a Reverse Private Tag being generated that will not show the content to members in the Silver level.
—
Private Tags and Reverse Private Tags can be used to hide and display messages to selected members depending on their membership levels. These options allow you to connect and communicate with members within your site in a whole new way. You can start using Private Tags and Reverse Private tags today to customize the experience for your members.