How to protect content on WordPress?

Whether you’re running a blog, a learning platform, or any site that offers specialized content, WP Full Members provides robust options for controlling access.


In this article, we will dive into the various content protection strategies you can deploy using WP Full Members. You'll learn how to protect entire pages and specific content fragments within those pages, and control access to custom posts.

Jump to:

Protecting entire page

In order to protect a page, a post, or a content with custom a post type, you must tell WP Full Members that the content is subscriber only, and also that it’s available at a membership level and beyond.

You can configure content visibility by editing the article, and configuring it in the ‘Status & Visibility’ & ‘WPFSM Members’ boxes:

Do the following:

  • Set visibility to ‘Public’ in the ‘Status & visibility’ box.
  • Check the ‘Subscriber only’ checkbox, and set the membership level at which the content should be available in the ‘WPFS Members’ box.

Important notes:

  • For users not having sufficient permissions to view the content, a designated ‘No access page’ is displayed which can be configured on the Settings page of the add-on.

Protecting content fragments

You can protect fragments of a page, not just entire pages.

For protecting blocks:

  • Set visibility to ‘Public’ in the ‘Status & visibility’ box.
  • Uncheck the ‘Subscriber only’ checkbox
  • Implement one of these shortcodes: 

    [fullstripe_members_display_fragment]   

    [fullstripe_members_hide_fragment]

Here is an example to display a div if the logged-in user has Silver or higher membership:

[fullstripe_members_display_fragment role="Silver"]   

<div>This is a fragment - showing it at Silver or higher</div>   

[/fullstripe_members_display_fragment]

Here is an example to hide a div if the logged-in user has Gold or higher membership:

[fullstripe_members_hide_fragment role="Gold"]   

<div>This is a fragment - hiding it at Gold or higher</div>   

[/fullstripe_members_hide_fragment]


Protecting custom post types

In WP Full Members, only pages of the ‘page’ post type can be protected by default.

You can protect posts or custom post types by implementing the fullstripe_members_supported_post_types filter.

The filter is applied also to the ‘No access page’ option on the Settings page, so the administrator can select a post of a custom post type.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us