s2MOP Shortcodes

I am trying to use the s2MOP shortcodes here https://s2member.com/kb-article/s2mop-shortcode/ and copied a few examples. I am using the following.

<h4>[s2MOP required_type="level"]"%%POST_TITLE%%" is a protected %%SEEKING_TYPE%% 
that requires a Login[/s2MOP]</h4>

<h4>[s2MOP required_type="ccap" required_value="my_ccap"]This content 
requires<code>my_ccap</code>[/s2MOP]</h4>

The first one works as intended, but the second one won’t work. I have a few pages that are accessible only to members with specific custom capabilities. It correctly prohibits them from accessing the page, but I would like to let logged-in users know why they can’t access the content depending on the capabilities they need.

Any insight would be greatly appreciated.

Hi AP,

I just tested it to see if I could reproduce the problem, but it worked fine. I created protected a page with the free_gift custom capability, and added the message to that Membership Options page:

[s2MOP required_type="ccap" required_value="free_gift"]This content required a Custom Capability called <code>free_gift</code>[/s2MOP]

Then I tried viewing the protected page as a guest, and was sent to the Membership Options page, and shown the line "This content required a Custom Capability called free_gift" as expected.

Do you see the MOP vars in the URL in the address bar of your browser after being redirected to the Membership Options page?

:slight_smile:

Yes, I see the vars in the URL, but they look a little suspect to me. ?_s2member_vars=ccap..ccap..my_ccap..page..275..

Are there supposed to be double periods in URL? Also, The users are logged in already, they just don’t have the custom capability. They get redirected to the member options page, but no message.

Ok. I feel like I should retract this post. It started working as intended. I’m assuming it was some sort of caching issue with the site or browser or both.

Thank you for your help!

1 Like

Great! Thanks for the update.

:slight_smile: