-
Author
-
September 12, 2017 at 17:21 #173422
btolle89
Participanthello,
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 #173559Laura
ModeratorHello, 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 solutionSeptember 14, 2017 at 00:42 #173600btolle89
ParticipantDomain etraveldate.com
Admin Login etraveldate.com/admin
Admin User btolle
Admin Password vE8B273mj&Qc&Mz!DLb(FOUFFTP Host name etraveldate.com
FTP USER btolle@etraveldate.com
FTP Password !1901twdSeptember 15, 2017 at 07:48 #173725Laura
ModeratorHello, 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 solutionSeptember 15, 2017 at 15:19 #173772btolle89
Participanthi! 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 #173863Laura
ModeratorHello, 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 solutionSeptember 16, 2017 at 15:15 #173891btolle89
Participantsure 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 #173973Laura
ModeratorHello, 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 solutionSeptember 19, 2017 at 12:45 #174090Laura
ModeratorHello, 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 solutionOctober 16, 2017 at 16:06 #176860btolle89
Participanthello, sorry for the extreme delay, there was considerable trouble gaining FTP access from the client
here are the details
FTP Host name etraveldate.com
FTP USER support@etraveldate.com
FTP Password !wowmuchsecureOctober 17, 2017 at 21:56 #176984Laura
ModeratorHello, 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 solutionOctober 18, 2017 at 17:31 #177052Radu
ModeratorHi,
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.