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™

Hiding the registration page once user has joined

s2Member Plugin. A Membership plugin for WordPress®.

Hiding the registration page once user has joined

Postby jenicantle » March 3rd, 2011, 10:53 am

Hi all,

I have a couple of questions, but will separate posts!

One:

I have a site where I have just a single pay to join option, so you are either a member or non member - in order to register you have to pay to join. So there is no "free" user account.

Once a member has registered and joined. How do I 'hide' the registration page?

Thanks :)
User avatar
jenicantle
Registered User
Registered User
 
Posts: 11
Joined: March 3, 2011

Re: Hiding the registration page once user has joined

Postby startasocialnetwork » March 4th, 2011, 1:16 pm

I'd try a simple conditional, where if someone isn't logged in, they see the registration page. If they are logged in, they see alternate content:

Code: Select all
[s2If is_user_logged_in()]
    Content for anyone that is logged in, regardless of their Membership Level.
[/s2If]

[s2If !is_user_logged_in()]
    Your registration page code. They're NOT logged in.
        A leading !exclamation means false.
[/s2If]
User avatar
startasocialnetwork
Registered User
Registered User
 
Posts: 23
Joined: October 8, 2010
Location: Vancouver, BC

Re: Hiding the registration page once user has joined

Postby jenicantle » March 24th, 2011, 11:21 am

Hiya!

Thanks for the reply on this and sorry for the delay - where do I put this code?

I basically just want the "join" navigation function disappear once they are logged in if possible?

Thanks
User avatar
jenicantle
Registered User
Registered User
 
Posts: 11
Joined: March 3, 2011

Re: Hiding the registration page once user has joined

Postby Cristián Lávaque » March 25th, 2011, 2:09 am

If you're not allowing open registration, the registration page won't be available except for those that just payed and need to create an account. WP Admin -> s2Member -> General Options -> Open Registration / Free Subscribers.

If you want to hide the offer to join the membership, then the explanation given by startasocialnetwork is quite correct. Basically, if the user is logged in you'd hide the link that sends him to the page with your invitation to join. Simple conditionals can be used in the body of your posts/pages. You can learn more about them here WP Admin -> s2Member -> API / Scripting -> Using Simple Conditionals.

If you want to use s2Member's conditionals in your theme to remove the Join Now link, then you'll need to use the Advanced Query Conditionals described here WP Admin -> s2Member -> API / Scripting -> Advanced Query Conditionals.

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

Re: Hiding the registration page once user has joined

Postby jenicantle » March 25th, 2011, 4:43 am

OK, cool thanks, I've used the simple scripting conditional to add different content to the join page (i.e. What are you doing here you're already a member?! - and then allowing them to invite their friends) If there a method of changing the "Members login" navigation buttons name to "log out'? I'm asking too much here i know - i do have to say, i tried ALOT of membership plugins before settling on S2 - I am exceptionally impressed. Thank you.
User avatar
jenicantle
Registered User
Registered User
 
Posts: 11
Joined: March 3, 2011

Re: Hiding the registration page once user has joined

Postby Cristián Lávaque » March 25th, 2011, 11:13 am

Wow, thank you for the kudos! :D

I'm really glad for you, it's very nice to see you're managing to achieve what you want with s2Member. :)

About your question on the members login link, which one? The one in WP's meta widget? That should change when the person is logged in. Or do you mean when you add the login link in your post? If the latter, then you'd again use a simple conditional for that, checking whether the person is logged in or not.

s2Member Pro also has a login widget that works perfectly with s2Member and is even usable in the body your page or post with a simple line of code. ;)

Is there a way to call upon the Pro Login Widget directly?

Yes, you can use this PHP tag if you'd like. <?php echo s2member_pro_login_widget(); ?>. For further details, please check your WordPress® Dashboard under: s2Member -> API Scripting -> Pro Login Widget via PHP. There are several options that can be configured dynamically through the PHP tag. It's not required, but you can get pretty creative if you check out the full documentation.
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

Re: Hiding the registration page once user has joined

Postby Cristián Lávaque » March 26th, 2011, 3:44 pm

I just wanted to add something I should have mentioned, because it may help you achieve what you want.

The s2Clean theme by PrimoThemes, is made to integrate with s2Member and it makes it very easy to change the navigation and widgets depending on whether the person is logged in or not.

You can watch a brief explanation of the theme in this video, starting around time 17:15 http://s2member.com/video-pro-intro

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: No registered users and 2 guests

cron