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™

Show hyperlink to members only

s2Member Plugin. A Membership plugin for WordPress®.

Show hyperlink to members only

Postby alberto » July 7th, 2010, 8:56 pm

I am trying to find out if your plugin will be useful for me

Want to show hyperlink to members only while keep only text for guests

For example:

[guests see] Link 1 - Link 2 - Link 3 - Link 4
[members see] Link 1 - Link 2 - Link 3 - Link 4

Thank you for your time.
User avatar
alberto
Registered User
Registered User
 
Posts: 5
Joined: July 7, 2010

Re: Show hyperlink to members only

Postby Jason Caldwell » July 8th, 2010, 5:05 am

Hi there. Thanks for your inquiry.

Yes, you can use s2Member to accomplish this.
You'll want to use s2Member's Advanced Conditionals.

Here is a quick example:
Code: Select all
<?php if(is_user_logged_in()){ ?>

    <a href="#">Link 1</a> - <a href="#">Link 2</a>

<?php } else { ?>

    Link 1 - Link 2

<?php } ?>
For further details, please install the s2Member plugin. Then, from your WP Dashboard, go to: s2Member -> API Scripting -> Advanced Conditionals. There are additional examples there.

Another example:
Code: Select all
<?php if(is_user_logged_in() && current_user_can("access_s2member_level1")){ ?>

    <a href="#">Link 1</a> - <a href="#">Link 2</a>

<?php } else { ?>

    Link 1 - Link 2

<?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

Re: Show hyperlink to members only

Postby alberto » July 17th, 2010, 2:16 pm

Thank you for your help. I am still evaluating and trying to figure out how everything works.
User avatar
alberto
Registered User
Registered User
 
Posts: 5
Joined: July 7, 2010

Re: Show hyperlink to members only

Postby Jason Caldwell » July 18th, 2010, 2:33 am

~Very welcome. Thanks for the followup.
~ 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: Google [Bot], Yahoo [Bot] and 4 guests

cron