- 1 Elementor Content Restriction
- 2 Inserting Shortcodes
- 3 Product Messages Widget
Paid Member Subscriptions integrates beautifully with the popular page builder Elementor.
The integration offers 3 features:
- Content restriction for Elementor sections, widgets and templates based on logged in status or subscription plans
- PMS shortcode insertion using the visual interface of Elementor
- Display restricted and/or discounted product messages on Single Product Elementor Template
Elementor Content Restriction
Using Paid Member Subscriptions the content restriction functionality will be extended for Elementor websites.
Restrict widgets and sections
The Content Restriction options for Elementor can be found under the Advanced tab, after you select a widget or section.
To restrict the content for Logged in Users, set the Restrict to logged in users switch to Yes. This will make the content of that widget or section to be available only to users that are logged in.
To restrict the content by subscription plans, click inside the select and choose one or more subscription plans which should have access to this content.
When a widget or section is not shown, the plugin will not output anything. By setting the Enable Restriction Messages switch to Yes, restriction messages will be displayed instead.
By default, the plugin will use the restriction messages that are defined on the PMS -> Settings -> Content Restriction page.
Custom Restriction Messages
Custom restriction messages that are specific to the widget or section that is being restricted can also be configured. First set the Enable Custom Messages switch to Yes and then choose between the two 2 options:
- Custom text
- Elementor Templates
Allows you to define a custom piece of text that is going to replace the element when an user can’t access it. Similar to the Message Content Restriction option available by default inside Paid Member Subscriptions.
This option lets you select an already defined Elementor Template as the content restriction message, so you can use the various content building options Elementor offers to create and style the message.
Example of Elementor Content Restriction
In the following screenshot you can see a restriction applied to a section composed of multiple widgets. The section is restricted to members of the Gold and Silver plans and the restriction message is making use of an Elementor Template.
Front-end display for users that do not have access
Differentiate between logged in and logged out users
Usually, the content that you want to display for users that are not logged in and users that are logged in but are not members, is different. In order to differentiate between the 2 scenarios, when creating custom messages or an Elementor Template, use the pms-restrict shortcode to define the content.
1 2 3
[pms-restrict display_to="not_logged_in"]Login in order to access this content.[/pms-restrict] [pms-restrict]You need a subscription in order to access this content.[/pms-restrict]
The content wrapped by the first shortcode will be shown only to users that are not logged in, while the content wrapped by the second shortcode will be seen only by logged in users.
Paid Member Subscriptions Shortcodes can be inserted more easily using the visual interface of Elementor. The widgets are grouped together in a special section that can be found after the General section.
Using them, you can place the Register, Login, Account and Recover Password forms anywhere you’d like within an Elementor grid.
Each shortcode comes with a few customization options that need to be added as parameters, by using Elementor to add the shortcodes, these options will be available directly in the interface.
Product Messages Widget
The Product Messages Widget can be found under the Product section of the Elementor editor. The Product section is visible when editing a Single Product Template.
This widget is used for displaying the Restricted Product and/or Membership Discount messages on the Single Product Template.
Restricted Product Message
This message will be displayed when the product purchase is restricted and the Add to Cart button is hidden.
If you leave this empty, the Custom Message for restricted product purchase will be displayed.
If Custom Messages are disabled or empty, the Default Message for restricted product purchase will be displayed.
Membership Discount Message
This message will be displayed to logged out or non-member users if a product has a Membership Discount.
If you leave this empty, the Product Discounted – Membership Required Custom Message will be displayed.