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™

Excludes on full locked site

s2Member Plugin. A Membership plugin for WordPress®.

Excludes on full locked site

Postby kaesarius » November 23rd, 2011, 7:53 am

hi all,

I have decided to take the membership to a subdomain of my main domain. So the domain is only the page that offers the service and the subdomain is the membership with all the content.

Reading some threads here I have managed to block the site entirely. Only by putting "/" on restrictions "URI" I have it. :P

But, I need to grant access to 4 pages, page options, subscription forms for each option.

How can I exclude these 4 pages of the restriction uri?

Ones again, thanks.
User avatar
kaesarius
Registered User
Registered User
 
Posts: 28
Joined: November 4, 2011

Re: Excludes on full locked site

Postby kaesarius » November 24th, 2011, 8:04 am

Finally i get a solution:
if anyone needs, create a file called s2-hacks.php on /wp-content/mu-plugins forlder to save it with this content:

Code: Select all
<?php

add_filter ("ws_plugin__s2member_check_post_level_access_excluded", "my_s2_exclusions");
add_filter ("ws_plugin__s2member_check_page_level_access_excluded", "my_s2_exclusions");

/* Now build the function. */ function my_s2_exclusions ($s2_says = FALSE)
    {
        global $page; /* Global ```$post`` object reference. */
        /**/
        if (is_page(array(304,492,496,639,1001,940,267))){
            return /* Exclude it, because it's allowed by Specific Post/Page Restrictions. */
         ($my_s2_says = true);}
        /**/
        return /* Otherwise return whatever s2Member says. */ $s2_says;
    }
?>


i hope it help.
User avatar
kaesarius
Registered User
Registered User
 
Posts: 28
Joined: November 4, 2011

Re: Excludes on full locked site

Postby Eduan » November 24th, 2011, 8:06 am

Thanks kaesarius!
I'm sure it will come in handy!
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron