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™

Restrict Access Based on the Template being used?

s2Member Plugin. A Membership plugin for WordPress®.

Restrict Access Based on the Template being used?

Postby rossbar » December 16th, 2011, 10:24 pm

Hey there,

I am working on a site that is using PODS and therefore not standard wordpress pages/posts. The pages I would like to restrict access to however, will all be using a unique page template. Can anybody help me figure out how I could customize s2Member to protect pages that use specific templates?

Thanks,
Barry
User avatar
rossbar
Registered User
Registered User
 
Posts: 1
Joined: December 16, 2011

Re: Restrict Access Based on the Template being used?

Postby Cristián Lávaque » December 19th, 2011, 3:24 am

s2Member doesn't do that by default, but I guess you could hack it.

http://www.wpmayor.com/wordpress-hacks/ ... eing-used/
http://codex.wordpress.org/Function_Ref ... e_template

You could use one of those in a conditional and then apply the access restriction based on it.

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


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 1 guest

cron