Hi @dgebel,
Does the regular user you’re testing this with have any PMS Membership attached to their account? You can search for this by going to Paid Member Subscriptions -> Members -> and searching for them.
The idea is that if they have an active membership to any of your plans, then they will be able see the restricted message. You can exactly what this not_subscribed parameter does here: https://www.cozmoslabs.com/docs/paid-member-subscriptions/shortcodes/#Display_Content_to_non-subscribers
Note 1: You have an extra “>” in the shortcode (at the end). That needs to be removed
[pms-restrict subscription_plans="all" display_to="not_subscribed" message="
You do not have an active membership">]
Note 2: The Admin can see the restricted content even if they have a membership since the Administrator role bypasses all Content Restrictions. This applies to all Content Restrictions forms and functionalities used by our plugin.
Thread Starter
dgebel
(@dgebel)
Okay, Note 2 solves why the admin can still see the restricted content. (Note 1 was just a typo on this page.)
What is actually there at the moment is this:
[pms-restrict subscription_plans="all" display_to="not_subscribed" message="You do not have an active membership."]
Welcome Member
[et_booking_calendar]
[/pms-restrict]
The “not_subscribed” message appears as expected when signed out, but signed in users with PMS subscriptions still get the same message instead of the booking plugin. I read the documentation several times, am I using this wrong?
Also, the “content restriction” options for all of the above is set in the side panel is “show content to – all users”. I don’t see how that would block showing the restricted content.
-
This reply was modified 1 week, 3 days ago by
dgebel.
Just so I’m sure, what type of user do you wish to see the actual content of that page/shortcode, and what type of users do you wish to see the restricted message?
Thread Starter
dgebel
(@dgebel)
If a user does have an active subscription, they should see the booking table. If they are not logged in or not subscribed, with an active subscription, they should not see the booking grid but the other “no active subscription” message above, I’ll add some HTML in there to tell them to go to some other page in the final version.
In this case, just use the normal restrict shortcode. For example:
[pms-restrict]
Restricted content
[/pms-restrict]
With this, only the users who have an Active membership will be able to see the restricted content, while the others will see the restriction message.
The way you used it before, with the display_to=”not_subscribed” parameter, works the other way around. Non-subscribers will see the restricted content, while subscribers will see the restriction message. As mentioned here: https://www.cozmoslabs.com/docs/paid-member-subscriptions/shortcodes/#Display_Content_to_non-subscribers.
Bassically, for what you’re trying to achieve simply, do not use the display_to=”not_subscribed” parameter
Thread Starter
dgebel
(@dgebel)
Ahhh. Sigh. Thank you.
This is why my programming boss refused to let us use “not” expressions 😛