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.

Not Logged in redirection question

Home Forums Community Forum Not Logged in redirection question

This topic contains 2 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 7 months ago.

Topic Author Topic
Posted: Saturday Jun 2nd, 2012 at 9:45 am #15253
Chase Rief
Username: riefmedia

Hi everyone,

I have a question about the redirection process for s2members.
If a site visitor is not logged in, the system will automatically redirect him to the “Membership Options” page.
I want something like the user being redirected to the membership options page but also a message notice displayed at the top of the page, letting the visitor know that the page he is trying to access is a members-only area.

What’s the code for that?

Thanks a lot!

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Saturday Jun 2nd, 2012 at 10:36 am #15256
Chase Rief
Username: riefmedia

I want to have a notification like:

“You tried to access #PAGENAME# or #FORUMS#.
This page requires #s2member LEVEL#, and your membership level is #USER LEVEL#. Please login or upgrade your membership to view the page content.”
[Regular Membership Options Page Content Below]

If i use the $_GET[‘_s2member_seeking’] it won’t work for displaying the bbPress forums names, although it works for pages. How can i get the #page s2member level#?

Thanks!

Posted: Monday Jun 4th, 2012 at 7:13 am #15342

Hi Chase.

The documentation here may help with that: [hilite path]Dashboard -› s2Member® -› API / Scripting -› Membership Options Page Variables (MOP Vars)[/hilite]

* `_s2member_req[level]` = a Membership Level # required for access ( only applies to Membership Level Access )
* `_s2member_req[ccap]` = a Custom Capability required for access ( only applies to Custom Capability Restrictions )
* `_s2member_req[sp]` = a Specific Post/Page ID required ( only applies to Specific Post/Page Access Restrictions )
    Tip: `_s2member_req[level|ccap|sp]` are mutually exclusive Requirement Types. 
     Only ONE of these three elements will be passed in combination with:
         `_s2member_seeking[post|page|catg|ptag|file|ruri]`.
Viewing 2 replies - 1 through 2 (of 2 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.