-
Author
-
July 9, 2017 at 06:16 #166777samuelhattonParticipant
Ok. I have 3 membership types in paid membership pro that are all free. I want someone to chose one of the three when registering for the site. I’m currently using buddypress as user interface. I don’t need member listing or groups. I’ve never used paid memberships pro before. What is the best way to force user to chose member type on sign up, give them a dashboard to view account information?
Is that applicable or more complicated than i need?
July 9, 2017 at 17:01 #166799Kieran_SQModeratorHi @samuelhatton,
I am going to assign this ticket to Radu who will be able to help you more with your question, they should be in touch soon.
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
July 11, 2017 at 16:44 #167028RaduModeratorHi,
You can use the next solution by adding the next code to wp-content/themes/kleo-child/functions.php
The code will allow users to register but immidiately after they finish registration users will be redirected and locked into the memebrship levels page until users buy or leave.
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() ); } } }
The snippet will be pasted in wp-content/themes/kleo-child/functions.php
NOTE : The Kleo Child Theme needs to be installed and activated.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 12, 2017 at 02:05 #173337Simon2902ParticipantHi @Radu
I have used your code for the same purpose as outlined by @samuelhatton. Unfortunately the code interrupts the correct loading of the homepage. The head loads but not the content. When refreshing the page, the content loads successfully. I am using the code below in functions.php of the child theme to use a different homepage for users (buddypress activity) than for visitors.
COPY CODE// set activity as homepage for logged in users function switch_homepage() { if ( is_user_logged_in() ) { $page = 6; // for logged in users update_option( 'page_on_front', $page ); update_option( 'show_on_front', 'page' ); } else { $page = 9517; // for logged out users update_option( 'page_on_front', $page ); update_option( 'show_on_front', 'page' ); } } add_action( 'init', 'switch_homepage' );
Do you have any suggestions please? Thanks.
September 12, 2017 at 16:54 #173415RaduModeratorHi,
Try to use theme_setup instead init or after_theme_setup it happens earlier than init, this may be a cause.
So replace the next line
add_action( ‘init’, ‘switch_homepage’ );
with
add_action( ‘theme_setup’, ‘switch_homepage’ );
OR
add_action( ‘after_setup_theme’, ‘switch_homepage’ );
Or you can give a try to this plugin : https://wordpress.org/plugins/bp-profile-as-homepage/
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.