Page 1 of 1

Teasers of the posts for free users, full for paid members?

PostPosted: March 10th, 2011, 12:18 am
by Mikko
Hi there!

I have been building my classified ad website with Classipress theme and s2member. I would like to have on my front page a short teaser of each ad posted, which would then show full for paid members. How could I make it? I have no php knowledge, but if You point me in the right direction, I'd be more than happy! :P

Mikko
http://www.flighthourbuilding.com

Re: Teasers of the posts for free users, full for paid membe

PostPosted: March 10th, 2011, 12:42 am
by Cristián Lávaque
Well, you can do this using conditions to decide what to show that user.

s2Member provides plenty of things you can check to see what his level is and whether he can see the content or not.

Instead of using the s2Member box in the edit page, you'll use code in the body of the post to decide what to show.

Here's good documentation on that: WP Admin -> s2Member -> API / Scripting.

There are also several videos you may watch, which will help you understand this, over at http://s2member.com/videos/

Hope that helps!

Re: Teasers of the posts for free users, full for paid membe

PostPosted: March 10th, 2011, 12:55 am
by Mikko
How could I apply this in every post that the users will be posting? Do I need to change the php code of some page? I already installed PHP execution, as I thought I can set these shortcodes already existing pages and posts, but I'd like it to be default and automatized.

Re: Teasers of the posts for free users, full for paid membe

PostPosted: March 10th, 2011, 1:19 am
by Cristián Lávaque
Hmm... I can understand why you'd want that.

Well, the first thing that comes to mind is to use the <!--more--> tag that splits the post and marks where the snippet for the listings ends, the full body is still avaiable to everyone in the post, though.

You could change the behaviour of the snippet so that it's the part shown to everyone, and the rest is protected by s2Member, displaying a registration message and button to those without access and the rest of the post to those with access.

I'm not exactly sure how to code that as a WP plugin, though. Maybe you can hire someone over at eLance, Rent-a-coder, Scriptlance or oDesk.

Re: Teasers of the posts for free users, full for paid membe

PostPosted: March 10th, 2011, 1:55 am
by Mikko
Thanks for your help, I will hire me a freelancer :)

Re: Teasers of the posts for free users, full for paid membe

PostPosted: March 17th, 2011, 2:12 pm
by lisakimms
Hi Mikko: I think I understand your question. I have mine set up the same way. What I did was set my post to show up as "Excerpt" instead of "full content".. Now am not sure your theme allows you to do that but I would imagine all of them do. If it does not then put a page break at the end of the paragraph you want to use as a teaser. Once you put a page break if you do not have the excerpt option at the end it will say something like "Read the rest of this entry here" or something similar to that. Once they click there to read the rest your sb2member will redirect them to your membership page. That is how I have mine set up and its working ok. Only Problem is I originally wanted all level 0 members to see my posts but for some weird reason they are not able to so I just for now leave it as is and everyone has to pay to read entire content. They all can see the first paragraph that is it.