Page 1 of 1

S2Member - Restricted Page Displays

PostPosted: March 16th, 2011, 5:17 am
by prema
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.

Re: S2Member - Restricted Page Displays

PostPosted: March 16th, 2011, 11:58 am
by Cristián Lávaque
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