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™

Can anyone explain how to use advanced conditionals?

s2Member Plugin. A Membership plugin for WordPress®.

Can anyone explain how to use advanced conditionals?

Postby drcoach » May 30th, 2010, 10:54 am

Hi again,
I'm in the midst of setting up my site with 4 membership levels. Before public launch I want to extend a free membership level to a special group of people who will be eventual leaders on the site. They will have a level 3 membership with access to all pages but their membership will be free.

I believe I need to use advanced conditionals to make this happen and I have seen the code provided. However, I do not understand where this code is to be inserted or how to customize it to make it do what I want it to do.

Is there anyone who can give an explanation in simple terms about where this code goes and where the content specific to someone's particular site goes into the code?

For instance, on the non-member page where I have the paypal sign up buttons for levels 1 and 2 I would like my invited members to see something like, "Congratulations, you have been invited to be a leader in our site. This is a free membership level with access to all our site's features" with a link to allow them to subscribe at this special level. How would I make this happen with the advanced conditionals code?

I'm sorry to be so dense about all this.
User avatar
drcoach
Registered User
Registered User
 
Posts: 23
Joined: May 22, 2010

Re: Can anyone explain how to use advanced conditionals?

Postby Jason Caldwell » June 23rd, 2010, 10:14 pm

Hi there. Very sorry for my extremely delayed response on this topic.

Step 1. Get the Exec-PHP plugin for WordPress ( very lightweight )
http://wordpress.org/extend/plugins/exec-php/

Step 2. Put something like this into a Post/Page of your choosing; using the HTML tab.
Also be sure to set: WordPress -> Options -> Writing -> Tag Balancing = off ( the default setting ).
Code: Select all
<?php if(S2MEMBER_CURRENT_USER_ACCESS_LEVEL === 0){ ?>

    Button for Level #1 upgrade. This will be presented to Free Subscribers at Level #0

<?php } ?>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

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

cron