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 partially protect posts

s2Member Plugin. A Membership plugin for WordPress®.

How to partially protect posts

Postby irtimood » May 25th, 2011, 4:47 am

Hello again :D

I have another setup problem: i'd like to make every protected post readable for the first 30 words and then show an invitation to signup just like "to read the entire article please join one of our plans".

In this way i can mantain the indicization on search engines of theese pages....
User avatar
irtimood
Registered User
Registered User
 
Posts: 3
Joined: May 25, 2011

Re: How to partially protect posts

Postby Cristián Lávaque » May 25th, 2011, 4:49 pm

Oh, that's a great model, and you can certainly achieve it with s2Member's simple conditionals (using WP shortcode). Here's the documentation for that WP Admin -> s2Member -> API / Scripting -> Using Simple Conditionals.
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

Re: How to partially protect posts

Postby hapke » May 30th, 2011, 10:10 am

Could you please give an example?
[insider]protected content[/insider]
Will that work?
User avatar
hapke
Registered User
Registered User
 
Posts: 38
Joined: October 5, 2010

Re: How to partially protect posts

Postby Cristián Lávaque » May 30th, 2011, 1:12 pm

It's documented where I pointed him to, but here's an example.

Code: Select all
My first 30 words...

[s2If current_user_can(access_s2member_level1)]
The rest of my post...
[/s2If]

[s2If !current_user_can(access_s2member_level1)]
Ask him to purchase access.
[/s2If]
* The ! before the condition means "not".

I hope that helps. :)
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

Re: How to partially protect posts

Postby hapke » May 30th, 2011, 1:43 pm

:)
User avatar
hapke
Registered User
Registered User
 
Posts: 38
Joined: October 5, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron