latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Premium content teaser

Home Forums Community Forum Premium content teaser

This topic contains 1 reply, has 1 voice. Last updated by  Karl 4 years, 6 months ago.

Topic Author Topic
Posted: Tuesday Jun 26th, 2012 at 2:50 pm #17566
Karl
Username: karl

New to s2Member and enjoying the power of the plugin so far. Have a question I’ve not been able to find a solution to and am wondering if I’m going about it the wrong way.

We have a site where we mix premium and free content – we’re restricting access by selecting a post level restriction in the custom post meta box.

In category view, we show posts with a short excerpt (a sentence or two). When a new visitor clicks on a premium post, we would like that they get taken to the single post view – where we show a longer description and a call-to-register, unless they’re already members and then they get to read all.

I’ve been reading about conditionals, but can’t figure out how to make it work for us. We’d prefer not to use shortcodes in the content (would need to remember to add this everytime), so we’re planning to have a custom description field which gets shown to visitors not-logged in, while members get to see the regular WordPress content field.

Is there a way to set post level restriction (which is very easy and convenient), but instead of forcing a redirection to the registration page for visitors who are not logged-in, they still get access to the post page, but we just feed them different content with PHP conditionals?

Here is an example of what we’re trying to do:

1. Category overview http://www.mckinseyquarterly.com/Energy_Resources_Materials/Electric_Power
2. Single premium post, with custom description and call-to-register http://www.mckinseyquarterly.com/Energy_Resources_Materials/Electric_Power/A_new_segmentation_for_electric_vehicles_2464

Thanks! Karl

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Monday Jul 2nd, 2012 at 11:49 am #18094
Karl
Username: karl

Thinking this over, I think I was looking at it the wrong way – we were restricting our posts in the custom post meta box.

But we don’t really need to do this – instead we use the standard content field for premium content description, then we have a custom field (created with the Types plugin) where we add our premium content, plus a checkbox to mark it “premium”. In the template, we check if the post is ticked as premium and if the user is logged in, otherwise we just show whatever is added to the standard content box.

Maybe there are security benefits to marking the whole post restricted, but this setup seems to work well for us when we want to show users a proper description for a post.

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.