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.

Protect a blog page from member levels

Home Forums Community Forum Protect a blog page from member levels

This topic contains 4 replies, has 3 voices. Last updated by  Annunziata Gianzero 3 years, 10 months ago.

Topic Author Topic
Posted: Saturday Mar 9th, 2013 at 6:47 pm #44171

I have 3 membership levels
(none of them cost money — they are determined by experience level)
Level 0 (people browsing the site without a login)
Level 1 (applied and accepted for junior membership)
Level 2 (applied and accepted for full membership)
(think of level 1 and level 2 as undergrad and grad, to make it more accessible since there are different classes for each)

So I have a series of classes available to each level — posted in blogs and categorized under these 2 levels
(basically the levels 1 and 2). What I need is to get to the blog page which has the category exclusive to Level 2 and above and if they are not level 2 or above they cannot view the offerings since the classes themselves are confidential info and are sent to a page which says that they are either not logged in or they do not have access privileges to view the Level 2 classes.

I cannot use the Page Level Restrictions, since that just bounces them back out to the member options page. They need to know WHY they can’t see these classes — either they are not logged in or they have insufficient credentials and should be pointed to options to upgrade to full membership.

Shortcodes do not work for that since the page itself is a blog page —
and the code
[s2If !is_user_logged_in()]
You must be logged in to sign up for this event
Not a member? CLICK HERE to apply.
[/s2If]

[s2If is_user_logged_in()]
[_s2If current_user_can(access_s2member_level2)]

if these conditions are met (they are logged in and level 2 or above) this is when the blog page with the “members only” category posts should appear

[/_s2If]
[/s2If] [s2If is_user_logged_in() AND !current_user_can(access_s2member_level2)]
This is a Full Members Only event. Please apply for full membership to access this event.
If your application has already been submitted, please email membership to expedite sign up for this event.

[/s2If]

What happens since it is a blog page is that the whole page shows up regardless of the level conditions in the shortcode.

So are there any suggestions you may have to make this happen?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Saturday Mar 9th, 2013 at 7:27 pm #44172
Poirot
Username: poirot

Is it not as simple as adding the info to your members option page telling them they have no access and need to upgrade?
That is what I do.

[I hope I udnerstood your question …]

Posted: Sunday Mar 10th, 2013 at 3:02 pm #44219

yes, for the meantime, that is what I do – thanks!

just was wondering if there were redirects to specific page conditionals that i could place on particular pages, rather than using the built in Page Level Restriction

Posted: Sunday Mar 10th, 2013 at 3:22 pm #44220
Bob Brandis
Username: bbran19

Hi Annunziata,
What is your website? I would love to have a look at it.
Bob

Posted: Sunday Mar 10th, 2013 at 3:25 pm #44221
Viewing 4 replies - 1 through 4 (of 4 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.