-
Author
-
September 12, 2017 at 17:21 #173422btolle89Participant
hello,
I would like to restrict access to the one’s profile page for all non-members. in other words, i do not want to allow someone to access and update their profile until after they are a member.
September 13, 2017 at 17:32 #173559LauraModeratorHello, this may be possible using a custom plugin, but i would need to edit it at your website, can you hare ftp and wp-admin?
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 🙂
September 15, 2017 at 07:48 #173725LauraModeratorHello, added this plugin with a few modifications
COPY CODE<?php /* Plugin Name: PMPro BuddyPress Customizations Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-buddypress-customizations/ Description: Example code to lock down parts of BuddyPress with PMPro Version: 0.2 Author: Stranger Studios Author URI: http://www.strangerstudios.com */ /* Copyright 2010 Stranger Studios (email : jason@strangerstudios.com) */ //hide some pages in buddypress function pmpros_hide_buddy_press_pages() { $uri = $_SERVER['REQUEST_URI']; $not_allowed = array( //"/members/", "/members/*/profile/" ); foreach($not_allowed as $check) { //prep for regex $check = str_replace("/", "[\/]+", $check); //replace / $check = str_replace("*\/", "[^\/]*\/", $check); //replace * in middle of URIs $check = str_replace("+*", "+.*", $check); //replace * at end of URIs $check = "/^" . $check . "\/?$/"; //add start/end / if(preg_match($check, $uri)) { wp_redirect( 'http://etraveldate.com/membership-checkout/' ); exit; } } } add_action("init", "pmpros_hide_buddy_press_pages"); //add_action("init", "pmpros_add_members"); add_action("pmpro_after_change_membership_level", "pmpros_pmpro_after_change_membership_level", 10, 2); ?>
Now your users will be redirected to Membership Levels when they try to access the profile
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 🙂
September 15, 2017 at 15:19 #173772btolle89Participanthi! thank you so much! but it doesn’t seem to work. I just registered as a new user and was able to go directly to my profile.
September 16, 2017 at 07:22 #173863LauraModeratorHello, i see, hmmm maybe we can do it another way, using some php at the header with css, and show a message that the profile is for vip users, would that be fine ?
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 🙂
September 16, 2017 at 15:15 #173891btolle89Participantsure thing. the idea is just to point them to the membership page, so if the message can do that, even if with a link that would be great! thank you so much for your help!
September 18, 2017 at 02:18 #173973LauraModeratorHello, i see an error when trying to view your site, let me know 🙂
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 🙂
September 19, 2017 at 12:45 #174090LauraModeratorHello, trying to access by ftp but seems like the password is not valid
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 17, 2017 at 21:56 #176984LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?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 18, 2017 at 17:31 #177052RaduModeratorHi,
Using the next code will makes your users to register normally and then after activation to be locked in the membership levels page until they buy something
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 solution -
AuthorPosts
You must be logged in to reply to this topic.