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™

Lockout Site

s2Member Plugin. A Membership plugin for WordPress®.

Lockout Site

Postby Silver Bullet » December 12th, 2011, 8:54 pm

Hey All,

I've recently installed s2member and can't seem to find a way to lockout the whole site. I'd like to have the first page an unregistered/not-logged in user sees is simply the registration form (I'd edit to make it clear what they need to do)

Any help on how this would be done would be very helpful.

Thanks
SB
User avatar
Silver Bullet
Registered User
Registered User
 
Posts: 2
Joined: December 12, 2011

Re: Lockout Site

Postby Eduan » December 12th, 2011, 10:07 pm

You may be interested in this post;
viewtopic.php?f=4&t=2287

Hope this helps. :)
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.

Re: Lockout Site

Postby Silver Bullet » December 13th, 2011, 9:33 am

Those weren't bad solutions ... but since I get the idea now .. I figured out something a little easier:

In you index.php (of your theme file) above the <? get_header(); ?> put:

<?php if(!is_user_logged_in()){ ?>
<?php header( 'Location: http://www.nameofsite.com/wp-login.php?action=register' ) ; ?>
<?php } else { ?>

then above <?php get_footer(); ?> put the following in:

<?php } ?>

---

Basically you're saying if the person isn't logged in as a user push them to the s2member registration page, otherwise show the page as normal. I've tested this quickly and seems to be ok. If anyone has problems/questions just post here and I'll take a look.
User avatar
Silver Bullet
Registered User
Registered User
 
Posts: 2
Joined: December 12, 2011

Re: Lockout Site

Postby Eduan » December 13th, 2011, 9:54 am

The code looks good, doesn't seem to be any problems in it.
Good job on doing this! And thanks for sharing this with others.
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: Bing [Bot], Google [Bot] and 1 guest

cron