latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

How to require a certain level OR CCAP

Home Forums Community Forum How to require a certain level OR CCAP

This topic contains 3 replies, has 2 voices. Last updated by  cassel 3 years, 7 months ago.

Topic Author Topic
Posted: Saturday May 18th, 2013 at 12:32 am #50157

Is it possible to have a page be available to a certain level OR a CCAP? I have a site with ~4500 members where we have only used 3 levels and no CCAPs (by mistake). We now are using CCAPs because they work so much better, but are running into a problem with needing to provide access to new users that have access to content via a CCAP while still providing access to old members with a certain level. It is not possible to make new content restricted only by CCAPs because we dont want lower levels to access some content.

So, is there a way to have some content, such as a page, accessible by a CCAP or a specific level?

thanks

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Saturday May 18th, 2013 at 11:27 am #50169
cassel
Username: cassel

You can use the conditionals instead of using the box on the right of the page (when you create your page in WP). Something like this:
[s2If current_user_can(access_s2member_level1) OR current_user_can(access_s2member_ccap_video)]
put the content that should be accessible by anyone with level 1 OR the “video” ccap
[/s2If]

and you can also add this:
[s2If !current_user_can(access_s2member_level1) AND !current_user_can(access_s2member_ccap_video)]
put a note to those who might land on the page but don’t have the proper access, maybe a sale pitch, or a link to something else, or just a “oops, you don’t have access to this page” message.
[/s2If]

Of course, you will likely have to remove any of the restrictions you might have put already on the top right box for s2Member on the page edit page.

Hope it helps.

Posted: Saturday May 18th, 2013 at 2:22 pm #50183

Billiant. Thank you…I know there was a simple solution.

Posted: Saturday May 18th, 2013 at 3:44 pm #50186
cassel
Username: cassel

You are welcome. CCAPS and conditionals are EXTREMELY powerful and useful. I think almost every single page on my site has those! It gives me so much control into how I want the content to be displayed.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.