-
Author
-
October 14, 2016 at 12:11 #139636meltdownParticipant
I’m a bit confused about new member signups. I have only one membership level (a FREE membership), which I have created. When someone registers, I want them to be automatically subscribed to that membership level.
As it is now, the new member is “registered” but is NOT registered to my one membership level. Instead, they are directed to a blank Membership Levels page (see attached image).
How can they be automatically subscribed to my membership level?
Thanks againAttachments:
You must be logged in to view attached files.October 14, 2016 at 12:20 #139638meltdownParticipantUsing the following code found at this support thread new members are directed to a blank Membership Levels page (as pictured in the attached image). Why is the page blank if I have created a FREE membership level?
COPY CODEadd_action( 'template_redirect', 'my_membersip_restrict' ); function my_membersip_restrict() { global $pmpro_pages, $post; if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) { if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) { wp_redirect( pmpro_url() ); } } }
Without that code they are “registered” but NOT registered to my one membership level. How can they just be automatically subscribed to my membership level?
Thanks again
October 15, 2016 at 04:24 #139759LauraModeratorHello, this is the function you need to add in order to assign a specific membership level to a newly registered user. Add it into your sweetdate-child/functions.php
COPY CODEadd_action('user_register', 'kleo_pmpro_default_level'); function kleo_pmpro_default_level($user_id) { pmpro_changeMembershipLevel(1,$user_id); }
Change the 1 for the membership level id#
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
October 15, 2016 at 10:16 #139781meltdownParticipantBeautiful! Thank you very much for your help 🙂
October 18, 2016 at 09:15 #140046LauraModeratorGlad to help 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
-
AuthorPosts
You must be logged in to reply to this topic.