Page 1 of 1

Restrict Access Based on the Template being used?

PostPosted: December 16th, 2011, 10:24 pm
by rossbar
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

Re: Restrict Access Based on the Template being used?

PostPosted: December 19th, 2011, 3:24 am
by Cristián Lávaque
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. :)