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.

Non-Incremental Access – Troubleshooting

Home Forums Community Forum Unofficial Extensions/Hacks Non-Incremental Access – Troubleshooting

This topic contains 0 replies, has 1 voice. Last updated by  Amy Winder 3 years, 3 months ago.

Topic Author Topic
Posted: Thursday Sep 19th, 2013 at 5:19 pm #59700
Amy Winder
Username: awinder

I’m creating a members-only website that offers news to customers in various categories. These customers already pay for the service on another platform, and we invoice them through our existing system, so we don’t need to use the PayPal or another payment gateway.

I am trying to implement the solution I outlined on a previous post here: https://www.s2member.com/forums/topic/non-incremental-access-pre-registered-users/#post-54176

But there are a couple of issues I’m running into. First, when loading a page to which I don’t have access, the script I added to functions.php is causing the page to load several registration forms on the same page. I’m not enough of a programmer to know what’s causing that, but I’m hoping it’s an easy fix.

(The site is currently at http://www.republictigerbiz.com.)

Second, I would like to re-direct non-subscribers to a simple page I create, instead of redirecting them to a page with a subscription form. I can’t get that to happen, either.

I feel like I’ve made a lot of progress and am close to getting a solution. These two issues will go a long way toward getting there. Thank you for your help!

Here’s what I added to the functions.php file:

/**
 * This is the stuff I added for custom capabilities.
add_action ("template_redirect", "my_custom_capabilities");

function my_custom_capabilities ()
   {

        if(is_category ("missouri") && !current_user_can ("access_s2member_ccap_missouri"))
            {
              header ("location: "http://republictigerbiz.com");
              exit ();
            }

         else if (is_category ("iowa") && !current_user_can ("access_s2member_ccap_iowa"))
            {
               header ("location: "http://republictigerbiz.com");
               exit ();
             }

 else if (is_category ("wisconsin") && !current_user_can ("access_s2member_ccap_wisconsin"))
            {
               header ("location: "http://republictigerbiz.com");
               exit ();
             }

 else if (is_category ("showprep") && !current_user_can ("access_s2member_ccap_showprep"))
            {
               header ("location: "http://republictigerbiz.com");
               exit ();
             }

 else if (is_category ("worldnational") && !current_user_can ("access_s2member_ccap_worldnational"))
            {
               header ("location: "http://republictigerbiz.com");
               exit ();
             }

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.