WordPress Invitation Code - How To - Hide Partial Content on Page/Post


Hiding Part of The Content on Pages/Post

Back to User Guide

Hiding Content

Hide URL or URL Path | Hide Partial Content on Page/Post | Hide a File

What Is This Feature

With the version 1.6.3 of the WordPress Invitation Code plugin, it's possible to hide parts of the content in any page, post or custom type post. Each restricted section with content can be unlocked independently from other restricted sections.

In the example below, a few parts of the text are locked - each with its own invitation code.

Restricting parts of the content with different invitation codes - Restrict Content Plugin
Restricting parts of the content with different invitation codes

Hiding Content

Two steps are necessary:

1) Code Must Have Specific Sharing Type

When creating the code, ensure its sharing type is Content Inside Page/Post.

Choosing partial content restriction type - WordPress Register with Invitation Code
Choosing partial content restriction type

2) Hiding Content

To actually hide the content, wrap it with the shortcode [cmicca_wrapped_content_access_code]. The shortcode has the following parameters:

  • code - The comma separated list of existing codes which allow to show restricted content. This parameter must be included to the shortcode.
  • view - The name of the view from the following: 
    • one - shows the field for entering regular invitation code (any length).
    • four - show the field for entering four digits invitation code.

      Default value is "one".

The box for entering an invitation code will show the code name on the front-end - to give the user a hint about which code to use here.

Example of using the shortcode:

[cmicca_wrapped_content_access_code code="code_1"] 
content 1 
[/cmicca_wrapped_content_access_code]

This way you can restrict different parts of the content with different invitation codes within the same page.

Choosing how the code stays valid - Members Plugin Restrict Content
Placing shortcode with different invitation codes to restrict different parts of the content

Important

If you want to use the method of partial content restriction, we recommend to you to switch the option Code stays valid for to Duration of session in general plugin settings. Otherwise, users will not be able to unlock a few parts of content at the same time, as the page reloads after each time the invitation code is entered.

Choosing how the code stays valid - Members Plugin Restrict Content
Choosing how the code stays valid

More information about the WordPress Invitation Code Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.