PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

S2Member - Restricted Page Displays

s2Member Plugin. A Membership plugin for WordPress®.

S2Member - Restricted Page Displays

Postby prema » March 16th, 2011, 5:17 am

Hello

I m new to S2Member Plugin.
And I need to display 'Pages' Widget according to the s2Member levels.

I could quitely achieve this through similar to following snippet, in sidebar.php

<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 0){ ?>
echo 'LEVEl 0 Member';
<?php } ?>
<?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 2){ ?>
echo 'LEVEl 2 Member';
<?php } ?>

But I need to set this in wp-admin panel.

That is restricted pages should not be visible to corresponding members after login.
Also need a possibility to add/remove restricted page IDs from wp-admin.

Anybody there to help out?

Its urgent.


Thanks a lot.
Thanks in advance

- Prema
User avatar
prema
Registered User
Registered User
 
Posts: 13
Joined: March 16, 2011

Re: S2Member - Restricted Page Displays

Postby Cristián Lávaque » March 16th, 2011, 11:58 am

You could achieve that using Advanced Query Conditionals in your templates, they're explained here WP Admin -> s2Member -> API / Scripting -> Advanced Query Conditionals.

Further details and additional functions can be found inside:
/s2member/includes/functions/api-functions.inc.php
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron