Custom Capabilities set up

Hi,

I bought s2Member Pro years ago and am now finally going to use it. I want to use custom capabilities instead of levels but there’s something I’m not understanding. I’m not a coder.

The videos I looked at are 4 years old and I was wondering if things have changed since then to make it simpler for non-developers.

My questions:

Do I have to use shortcodes on the pages that I want to use for ccap?
Do I have to add some code in my functions.php first?
What is the purpose of Require Custom Capabilities on pages/posts - can I add a name there or must it first be set up elsewhere?

So for example say I create a page that contains a course and I want to use the term ‘speakup’ as the ccap. I then want to create a payment button for that and I understand that I add speakup in the ccap section.

My confusion is around what I must have done before all that for the button and access to work.

Thanks in advance for your help.
Sofia

I am not a coder either and i have been using s2M for over 8 years now. CCAPS are powerful and there is a more powerful way to use it, that is not often talked about, so i’ll try to answer your questions with my own experience.

Do I have to use shortcodes on the pages that I want to use for ccap?
You can, but you don’t have to.

Do I have to add some code in my functions.php first?
I have never touched that for ccaps, so don’t worry.

What is the purpose of Require Custom Capabilities on pages/posts - can I add a name there or must it first be set up elsewhere?
You can set a particular page (or post) to be accessible only with a specific CCAP there. If the visitor does not have that ccap, he will be redirected to the Membership option page.

You don’t have to do anything BEFORE creating your button/form with a ccap, as long as you know what you will be using. If you want the course to be available only to those who made a purchase with a button/form where you associated the ccap “speakup” when you generated it, you CAN set that “speakup” in the “Require Custom Capabilities” field BUT, I personally prefer a slightly different approach: wrap your content in a conditional that will use that ccap.

So you page could start with this conditional:
[s2If current_user_can(access_s2member_ccap_speakup)]
Display the content you want the member to see
[/s2If]
[s2If current_user_cannot(access_s2member_ccap_speakup)]
Display a sale pitch or other information about the course for those who don’t have that ccap OR might not be logged in
[/s2If]

I tend to prefer this approach because it allows me to customize my message to those wanting access to this particular content without redirecting them somewhere else, and getting them lost along the way.

I hope this helps.

1 Like

Thank you for your comprehensive response. So just to make sure I understand correctly - if I wanted to I could decide I’m going to use speakup, put it in the Require Custom Capabilities and create the button with that ccap and it’s done right?

Do you have a page on a site you could show me so that I can see how it looks with the way you have done it?

I’m using Thrive Apprentice for my course so it’s not a regular WP page or post. Will have to see how it works with s2. I really like the ccap rather than levels.

Thanks again.

Yes, if you enter the “speakup” ccap in the Required custom Capabilities, you could be done. As i said, using the ccaps in conditional shortcodes just add more flexibility for different reasons.

It might be hard for you to see it in action and how i do it, but here is one page where i use that kind of conditionals: https://scrapbookcampus.com/master-classes/over-the-top/

If you are logged out, you will see the “sale pitch”.
If you are logged in but don’t have the ccap for that particular class, you will see the streaming video and a prompt to purchase the package.
If you are logged in and have the ccap for that class, you will see the streaming video, the button to download the video and the written guide.

I am not using Thrive, but i would assume it should work just the same.
If you want a tour of the “inside” of the pages when using ccaps and/or conditional, drop me an email by clicking the yellow tab on the right of that page linked above.

1 Like

Thanks Carole,

I sent you a message through your site.

1 Like