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™

How to protect some content of a post?

s2Member Plugin. A Membership plugin for WordPress®.

How to protect some content of a post?

Postby alinew » September 28th, 2010, 7:26 am

Hi ,
how can i protect some content of a post?
Such as, content between <s2_level_one>Content for Level one</s2_level_one>,
<s2_level_two>Content for Level two</s2_level_two>...
That "Content for Level one" is just for level one or above, "Content for Level two" is for level two or above.
User avatar
alinew
Registered User
Registered User
 
Posts: 2
Joined: September 28, 2010

Re: How to protect some content of a post?

Postby drbyte » September 28th, 2010, 12:20 pm

<?php if (current_user_can("access_s2member_level1")){ ?>
Some content for Members who are logged in with an s2Member Level >= 1.
<?php } else { ?>
Some public content.
<?php } ?>
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: How to protect some content of a post?

Postby alinew » September 30th, 2010, 4:36 am

Thanks
User avatar
alinew
Registered User
Registered User
 
Posts: 2
Joined: September 28, 2010

Re: How to protect some content of a post?

Postby Elizabeth » October 2nd, 2010, 11:06 am

Thank you.
User avatar
Elizabeth
Moderator
Moderator
 
Posts: 160
Joined: May 12, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests