WordPress Pay Per Post Plugin (CMPPP) - How To - Restrict Sections Of The Content (Shortcode)
Restricting Sections of The Content
TIP: What Are Shortcodes
Shortcodes add dynamic content to your site via a small piece of code.
Learn more: Shortcodes - How To Use | Finding ID of Post/Page/Other Content
What is This Feature
The WordPress Pay Per Post plugin version 2.1.3 introduced a shortcode to restrict sections of the content.
If the user is not a subscriber, they will see a "Restricted Section" box instead of the locked content. A paybox will be triggered at the end of the content.
How It Works
The subscription model setting applies to this shortcode.
- "Pay per each post" - users have to activate subscription for each post.
- "Pay per pricing group" - users have to activate subscription once for pricing group and they will have access to all posts associated with this pricing group.
- "Pay per pricing group or single post" - users can see both subscription options mentioned above on every post or page. (Feature added in version 2.0.7).
Learn more: Settings - Subscriptions Settings (General Tab)
How to Use the Shortcode
Locking the content is easy. Simply surround it with the shortcode, as shown:
[cmppp_restricted] any content [/cmppp_restricted]
Example
You can use the shortcode many times in the same content. The following is an example of the Back-End:
![Adding restriction shortcodes on the back-end - Pay-Per-Post Plugin](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/5c6c1e98042863543ccd2bbc/file-ji1VORvnk6.png)
And the resulting Front-End:
![Restricted parts of the content on the front-end - WordPress Paywall Plugin](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/5c6c1fc2042863543ccd2bd2/file-7mJKKFPp3U.png)
Elementor Limitation
When using the Elementor page builder, it's necessary to use this shortcode to block any page on top of assigning the post to a price (see How To - Assign a Post to a Price/Subscription (Video).
This limitation is due to Elementor not using the _content hook.
Customizing the Text
You can customize the text of the restricted section box:
![Text example in the restriction box - Paywall Plugin WordPress](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/5c6c207e042863543ccd2bdf/file-cBTqOmHrZ5.png)
To do so, navigate to the Admin Dashboard → CM Pay Per Posts Pro → Settings.
![Navigation to the plugin settings - Best Paywall Plugin for WordPress](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/57a9d5ddc6979107832430c7/file-adc6Ryzbhr.png)
Then click on the Labels tab.
![Labels tab - WordPress Plugin Paywall](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/57a9e0c5c697910783243122/file-sZih8RGAcb.png)
There are two relevant labels:
- restricted_shortcode_heading - default is "Restricted Section"
- restricted_shortcode_content - default is "Only subscribed user would be able to view this content."
![Labels settings - Paywalled Content](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/5c6c20042c7d3a66e32ea309/file-ktNMgAnfSZ.png)
Cusomizing the Boxes and Checkout Button
The following feature was introduced in version 2.4.3.
You can customize the appearance of the Restricted section box, Paybox and Checkout Button.
![Example of the box with the custom style - Paywall Solutions for Publishers](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/603529c60a2dae5b58fb29d5/file-4Q639O6m2D.png)
![Example of the box with the custom style - WordPress Pay Per Post Plugin](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/603529cd661b720174a700b2/file-G5XqNTJO0H.gif)
To change the style navigate to Admin Dashboard → CM Pay Per Posts Pro → Settings → Styles tab.
![Styles settings - Pay-Per-Post Plugin](http://d33v4339jhl8k0.cloudfront.net/docs/assets/558f9e89e4b01a224b42f278/images/603517b324d2d21e45ed9421/file-YplSH0UbT4.png)
There are two sections - section Paybox for configuring the style of Paybox and Restricted section box, and the second section is for configuring the style of the Checkout Button.
Learn more: CM Pay Per Post (CMPPP) - Settings - Styles
![]() |
More information about the WordPress Pay Per Post 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 |