Search Results for 'how to hide pages'
-
Search Results
-
Topic: Page and post budypress
I’m going to do more with your admin groups .
For example
The box administrator with limited opportunities can base your group and take their users, and manage them . But it can not manage other groups.
Then the administrator and his group can hide posts or publish .
Group administrator can grant up to the author ’s website , but can not modify pages of other groups ?
Possible?
Thank you
Hello,
I habe some profile fields at the registration eg. address, email.
Now I want them not to show at the registration and only under the profile tab. I tried it with css but then it dissappears at both pages 🙁.editfield.field_8.field_e-mail.optional-field.visibility-public.alt.field_type_textbox {display: none;}
With the code above it’s hidden everywhere. How can I only hide it at registration page? Would be great if someone can help me!Thanks for yout help
I want to remove “Notifications”, “Messages”, and “Settings” from the first nav bar on user pages.
I’d also like to hide the user header (the profile pic, username, and cover photo section) on certain user pages.
Any help would be appreciated.
BP 2.5.3
WP 4.5.2Hello, im having problems with the registration and activity pages on my website, im new at this, so i dont know if i’ve made a mistake and where i might have made it…
I installed buddypress through wordpress plug-in search engine, and then went to settings and set up everything as i wanted, edited the profile fields as i needed, and then when i tried to visit the pages i only get the title of the page and the rest is blank, as if it where a normal page.
I’ve been searching different forums about people having the same problem, but i haven’t been able to find a solution, they’ve either been posted a lot of years ago, or they just say solved and do not share how they solved it.
If anyone can help, i will appreciate it a lot!!I have read the codex as many suggested, but it did not help because i did everything as it indicate to do it.
I created the register and activate page and then assigned them under Settings/Buddypress/Pages, how the codex indicates so. (i did not edit in any way the pages, i only created and assigned them.
I made sure that in Settings/General under membership the “anyone can register” is checked.
I’ve checked if the register.php and activate.php files do exist.
I read that it might be a bug, so i tried uninstalling this version (V2.5.2) and installing V2.5.1 and V2.3.5, just in case that would fix it…I truly don’t know what else to do.
Its my first website and i do not know a lot of coding, im learning as i go.
Could it be a bug in the plug-in? if so… how can i fix it?Just in case it helps, my host company is hostgator, WordPress is updated to the lates version, so is buddypress.
I have the following plug-ins installed (i know they are a lot, but since i do not know how to code, i sort of need them…) :
Admin Custom Login
Black Studio TinyMCE Widget
Black Studio Touch Dropdown Menu
BP Registration Options
BuddyPress
BuddyPress Cover Photo
BulletProof Security
Confirm User Registration
Contact Form 7
Duplicate Post
Hide Admin Bar From Non-admins
Lightbox Plus Colorbox
Meta Slider
No Right Click Images Plugin
Page Builder by SiteOrigin
PMPro KISSmetrics
Polylang
Protect My Contents
Quick Page/Post Redirect Plugin
SB Welcome Email Editor
SiteOrigin Widgets Bundle
Spacer
Title Remover
Wordfence Security
WordPress Access Control
WP Bouncer
WP Maintenance ModeThanks in advance for your help!
Hi, i installed Capa plugin to hide some pages to unlogged users. I also used two page (friends and activity) of buddypress that automatically hide themselves when an user is unlogged. Unfortunately Capa plugin has problem to these two page, probably is not supported. Can you give me an advice or a supported plugin to hide pages? Thanks
I’ve done a lot of searching but did not find a complete answer on how to do this.
Basically, I want users to sign up with a Username, Email and Password. I want to disable the BuddyPress “Name” field (which is required).
The Display Name for every user will be the same as their username.
Every answer I found suggests using Javascript to hide this field. This seems like a terrible solution to me.
How can I completely disable the required Name field from the registration and profile pages?
Topic: PMPRO and Buddypress
Has anyone been successful at blocking buddypress pages until PMPRO email confirmation is complete? I seem to be getting nowhere with PMPRO folks.
I am able to block /groups/, /members/, etc., but I cannot seem to block the sub-pages (e.g. /groups/group-name/). I took the PMPRO email confirmation code and modified it as follows. Any help is greatly appreciated!
<?php
/*
Plugin Name: Paid Memberships Pro – Email Confirmation Add On
Plugin URI: http://www.paidmembershipspro.com/addons/pmpro-email-confirmation/
Description: Require email confirmation before certain levels are enabled for members.
Version: .3
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
/*
Sample use case: You have a free level but want people to use a real email address when signing up.
*//*
[Deprecated] Set this array to the include the levels which should require email confirmation.global $pmpro_email_confirmation_levels;
$pmpro_email_confirmation_levels = array(6);Use the checkbox on the edit levels page instead.
*//*
Add checkbox to edit level page to set if level requires email confirmation.
*/
//show the checkbox on the edit level page
function pmproec_pmpro_membership_level_after_other_settings()
{
$level_id = intval($_REQUEST[‘edit’]);
if($level_id > 0)
$email_confirmation = get_option(‘pmproec_email_confirmation_’ . $level_id);
else
$email_confirmation = false;
?>
<h3 class=”topborder”>Email Confirmation</h3>
<table>
<tbody class=”form-table”>
<tr>
<th scope=”row” valign=”top”><label for=”email_confirmation”><?php _e(‘Email Confirmation:’, ‘pmpro’);?></label></th>
<td>
<input type=”checkbox” id=”email_confirmation” name=”email_confirmation” value=”1″ <?php checked($email_confirmation, 1);?> />
<label for=”email_confirmation”><?php _e(‘Check this to require email validation for this level.’, ‘pmpro’);?></label>
</td>
</tr>
</tbody>
</table>
<?php
}
add_action(‘pmpro_membership_level_after_other_settings’, ‘pmproec_pmpro_membership_level_after_other_settings’);//save email_confirmation setting when the level is saved/added
function pmproec_pmpro_save_membership_level($level_id)
{
if(isset($_REQUEST[’email_confirmation’]))
$email_confirmation = intval($_REQUEST[’email_confirmation’]);
else
$email_confirmation = 0;
delete_option(‘pmproec_email_confirmation_’ . $level_id);
add_option(‘pmproec_email_confirmation_’ . $level_id, $email_confirmation, ”, ‘no’);
}
add_action(“pmpro_save_membership_level”, “pmproec_pmpro_save_membership_level”);/*
Functions
*/
//Check if a level id requires an invite code or should generate one
function pmproec_isEmailConfirmationLevel($level_id)
{
global $pmpro_email_confirmation_levels;//get value from options
$email_confirmation = get_option(‘pmproec_email_confirmation_’ . $level_id, false);//check option and global var
return (!empty($email_confirmation) || !empty($pmpro_email_confirmation_levels) && in_array($level_id, $pmpro_email_confirmation_levels));
}//generate a key from a user id
function pmproec_getValidationKey($user_id)
{
$key = md5($user_id . AUTH_KEY . $user_id);
if(strlen($key) > 16)
$key = substr($key, 0, 16);return $key;
}/*
Save validation key in user meta after checkout.
*/
function pmproec_pmpro_after_checkout($user_id)
{
global $pmpro_level;if(pmproec_isEmailConfirmationLevel($pmpro_level->id))
{
//already validated?
$oldkey = get_user_meta($user_id, “pmpro_email_confirmation_key”, true);
if($oldkey != “validated”)
{
//nope? give them a key
$key = pmproec_getValidationKey($user_id);
update_user_meta($user_id, “pmpro_email_confirmation_key”, $key);
}
}
}
add_action(“pmpro_after_checkout”, “pmproec_pmpro_after_checkout”);/*
If a user hasn’t validated yet and needs it, don’t give them access.
*/
function pmproec_pmpro_has_membership_access_filter($hasaccess, $mypost, $myuser, $post_membership_levels)
{
//hide_buddy_press_pages()
$uri = $_SERVER[‘REQUEST_URI’];//lock some things for members only
$members_only = array(
“/members-2/”, “/activity/”, “/groups-2/”, “/forums/”, “/welcome-back/”
);
//if they don’t have access, ignore this
if(!$hasaccess)
return $hasaccess;//if this isn’t locked by level, ignore this
if(empty($post_membership_levels))
return $hasaccess;//does this user have a level that requires confirmation?
$user_membership_level = pmpro_getMembershipLevelForUser($myuser->ID);
if(pmproec_isEmailConfirmationLevel($user_membership_level->id))
{
//if they still have a validation key, they haven’t clicked on the validation link yet
$validation_key = get_user_meta($myuser->ID, “pmpro_email_confirmation_key”, true);if(!empty($validation_key) && $validation_key != “validated”)
{
$hasaccess = false;
foreach($members_only as $check)
{
//make sure they are a memberif(preg_match($check, $uri))
{
wp_redirect(“http://www.google.com”);
exit;
}
}
}
}
return $hasaccess;
}
add_filter(“pmpro_has_membership_access_filter”, “pmproec_pmpro_has_membership_access_filter”, 10, 4);/*
Add validation lik to confirmation email.
*/
function pmproec_pmpro_email_body($body, $email)
{
//must be a confirmation email and checkout template
if(!empty($email->data[‘membership_id’]) && pmproec_isEmailConfirmationLevel($email->data[‘membership_id’]) && strpos($email->template, “checkout”) !== false)
{
//get user
$user = get_user_by(“login”, $email->data[‘user_login’]);$validated = $user->pmpro_email_confirmation_key;
$url = home_url(“?ui=” . $user->ID . “&validate=” . $validated);//need validation?
if(empty($validated) || $validated != “validated”)
{
//use validation_link substitute?
if(false === stripos($body, “!!validation_link!!”))
{
$body = “<p>IMPORTANT! You must follow this link to confirm your email address before your membership is fully activated:<br />” . $url . “</p><hr />” . $body;
$body = str_replace(“Your membership account is now active.”, “”, $body);
} else
$body = str_ireplace(“!!validation_link!!”, $url, $body);
}
}return $body;
}
add_filter(“pmpro_email_body”, “pmproec_pmpro_email_body”, 10, 2);/*
Process validation links.
*/
function pmproec_init_validate()
{
if(!empty($_REQUEST[‘validate’]) && !empty($_REQUEST[‘ui’]))
{
$validate = $_REQUEST[‘validate’];
$ui = $_REQUEST[‘ui’];
$user = get_userdata($ui);
if($validate == $user->pmpro_email_confirmation_key)
{
//validate!
update_user_meta($user->ID, “pmpro_email_confirmation_key”, “validated”);do_action(‘pmproec_after_validate_user’, $user->ID, $validate);
if(is_user_logged_in())
wp_redirect(home_url());
else
wp_redirect(wp_login_url());exit;
}
}
}
add_action(“init”, “pmproec_init_validate”);/*
Update confirmation page to mention validation email if needed.
*/
function pmproec_pmpro_confirmation_message($message)
{
//must be an email confirmation level
if(!empty($_REQUEST[‘level’]) && pmproec_isEmailConfirmationLevel(intval($_REQUEST[‘level’])))
{
global $current_user;
if($current_user->pmpro_email_confirmation_key != “validated”)
{
$message = str_replace(“is now active”, “will be activated as soon as you confirm your email address. Important! You must click on the confirmation URL sent to ” . $current_user->user_email . ” before you gain full access to your membership“, $message);
}
}return $message;
}
add_filter(“pmpro_confirmation_message”, “pmproec_pmpro_confirmation_message”);/*
Function to add links to the plugin row meta
*/
function pmproec_plugin_row_meta($links, $file) {
if(strpos($file, ‘pmpro-email-confirmation.php’) !== false)
{
$new_links = array(
‘‘ . __( ‘Support’, ‘pmpro’ ) . ‘‘,
);
$links = array_merge($links, $new_links);
}
return $links;
}
add_filter(‘plugin_row_meta’, ‘pmproec_plugin_row_meta’, 10, 2);/**
* Add link to the user action links to validate a user
*
* Use the pmproec_validate_user_cap filter to change the capability required to see this.
*/
function pmproec_user_row_actions($actions, $user) {
$cap = apply_filters(‘pmproec_validate_user_cap’, ‘edit_users’);
if(current_user_can($cap))
{
//check if they still have a validation key
$validation_key = get_user_meta($user->ID, “pmpro_email_confirmation_key”, true);
if(!empty($validation_key) && $validation_key != “validated”)
{
$url = admin_url(“users.php?pmproecvalidate=” . $user->ID);
if(!empty($_REQUEST[‘s’]))
$url .= “&s=” . esc_attr($_REQUEST[‘s’]);
if(!empty($_REQUEST[‘paged’]))
$url .= “&paged=” . intval($_REQUEST[‘paged’]);
$url = wp_nonce_url($url, ‘pmproecvalidate_’ . $user->ID);
$actions[] = ‘Validate User‘;
}
else
$actions[] = ‘Validated’;
}return $actions;
}
add_filter(‘user_row_actions’, ‘pmproec_user_row_actions’, 10, 2);
add_filter(‘pmpro_memberslist_user_row_actions’, ‘pmproec_user_row_actions’, 10, 2);/**
* Manually validate a user. Runs on admin init. Checks for pmproecvalidate and nonce and validates that user.
*
*/
function pmproec_validate_user()
{
if(!empty($_REQUEST[‘pmproecvalidate’]))
{
global $pmproec_msg, $pmproec_msgt;//get user id
$user_id = intval($_REQUEST[‘pmproecvalidate’]);
$user = get_userdata($user_id);//no user?
if(empty($user))
{
//user not found error
$pmproec_msg = ‘Could not reset sessions. User not found.’;
$pmproec_msgt = ‘error’;
}
else
{
//check nonce
check_admin_referer( ‘pmproecvalidate_’.$user_id);//check caps
$cap = apply_filters(‘pmproec_validate_user_cap’, ‘edit_users’);
if(!current_user_can($cap))
{
//show error message
$pmproec_msg = ‘You do not have permission to validate users.’;
$pmproec_msgt = ‘error’;
}
else
{
//validate!
update_user_meta($user_id, “pmpro_email_confirmation_key”, “validated”);//show success message
$pmproec_msg = $user->user_email . ‘ has been validated.’;
$pmproec_msgt = ‘updated’;
}
}
}
}
add_action(‘admin_init’, ‘pmproec_validate_user’);/**
* Show any messages generated by PMPro Email Confirmations
*/
function pmproec_admin_notices()
{
global $pmproec_msg, $pmproec_msgt;
if(!empty($pmproec_msg))
echo “<div class=\”$pmproec_msgt\”><p>$pmproec_msg</p></div>”;
}
add_action(‘admin_notices’, ‘pmproec_admin_notices’);This problem is actually two-fold, but has to do with the Activity Stream both times.
Firstly, when the “Load More” button is clicked, nothing seems to happen. An initial hover shows a link to http://gratitudeexpressions.com/?actsc=2, and every time after the first click, it shows http://gratitudeexpressions.com/#more. I know there are many more posts because they are shown after I increase the per_page limit in the code.
Then, on profile pages, the activity stream does not show at all, even after posting an update. If there truly are no updates by the user, it will show the “Sorry, there was no activity found.” message, but if there are updates, it doesn’t show anything. You can check http://gratitudeexpressions.com/members/plqbari/ as an example. This user has posted an update (and you can see it right under the username), but it doesn’t show up in the stream.
I have checked for plugin issues; no dice. I have not manipulated code other than to change the “What’s New” text on activity streams and change some CSS and hide the Favorite button. I contacted the developer for the Buddy theme I’m running, and he helped me figure out the problem persists on other themes. I have been dealing with this issue for close to a week and am truly stumped!
Topic: Hide pages /Member 2 plugin
Hi
I have an x rated site where I would like to set the activity stream and pics etc to viewable by members only. At the moment i have Private community for BP installed and activated but it does not seem to do the job as I want. I also have Member 2 installed but not ativated. I have not dwelled in to that one yet but wonder if that is the way to go to differ the non reg visitors to site members.
Any tips?
Hi Folks – It’s come to our attention that the users pages are being indexed by google and are also visible to anyone who is not logged in.
http://shortiedesigns.com/cpn/for-members/find-a-network-member/members/matt_parselle/
I’ve done lots of googling and can’t quite find what I’m looking for.
I need to make sure that everything about the user is private and only logged in members can see.
I tried the below – but it only stopped the activity page – not the profile or forum page. I would love some clues if anyone has any! Thanks
//Add a function to hide buddypress activity page from non-logged in users
/* Prevent logged out users from accessing bp activity page */
function nonreg_visitor_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_members_component() ||bp_is_page( BP_MEMBERS_SLUG ) ) {
if(!is_user_logged_in()) { //just a visitor and not logged in
wp_redirect( get_option(‘siteurl’) . ‘/wp-login.php’ );
}
}
}
add_filter(‘get_header’,’nonreg_visitor_redirect’,1);Topic: Cannot Edit Theme Files
I have spend the past 2 days digging through the documentation with no luck.
Simple question, how do I edit the raw template files (the actual html) for the current version of BuddyPress (2.4.3)? Specifically, the public-facing profile pages.
So, I have a theme, let’s call it “mytheme”, and I copied the contents from /plugins/buddypress/bp-templates/bp-legacy/buddypress/ into /wp-content/themes/mytheme/buddypress/
First off, is that copying and overriding process still correct? I’ve read that in a few places but I don’t know if it is the current method. Also, if I only need to edit one file (/members/single/member-header.php for example), could I simply just copy that single file (along with the folder structure of course) and then customize it? Or do I need to copy all of the files and folders?
Secondly, for some reason, I can no longer edit the template files. It seems like no matter what I do, I cannot find or edit code.
I am trying to edit some code from /wp-content/themes/mytheme/buddypress/members/single/member-header.php and nothing I do affects the code.
For example, I am trying to edit this:
<h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>
to
<h2 class="user-nicename">TESTING @<?php bp_displayed_user_mentionname(); ?></h2>
but nothing happens.
Strangely, I am able to make edits to /wp-content/themes/mytheme/buddypress/members/single/home.php
On line 41, I was able to comment out:
bp_get_displayed_user_nav();
Which actually had an effect on the page.
What could I be doing wrong here? I tried downloading a fresh copy and I’ve been trying to read about how to edit the theme files, there doesn’t seem to be much information about it. Why can I edit parts of /wp-content/themes/mytheme/buddypress/members/single/home.php and not /wp-content/themes/mytheme/buddypress/members/single/member-header.php ?
Any advice on this would be massively appreciated. 🙂 I really tried and searched for a long time before asking.
*I also wonder if this is related to what this user asked about: https://buddypress.org/support/topic/remove-or-hide-on-profile-in-front-of-username/
Topic: A lot of forums for a group
Hi,
config WP :
– WordPress : 4.3.1
– Version de PHP/MySQL : 5.6.6 /
– Thème utilisé : Twenty Fifteen
– Thème URI : https://wordpress.org/themes/twentyfifteen/
– Extensions : AddQuicktag (2.4.3), Advanced Image Styles (0.3), bbPress (2.5.8), BuddyPress (2.3.4), Captcha by BestWebSoft (4.1.5), Category Post list Widget (1.1), Contextual Related Posts (2.2.3), Font Awesome Icons (3.2.1), Forum_wordpress_fr (3.9), GD bbPress Attachments (2.3.1), Jetpack by WordPress.com (3.7.2), List Pages Shortcode (1.7.2), Subscribe to Comments Reloaded (150611), Super RSS Reader (2.5), Wordfence Security (6.0.20), WP Hide Post (1.2.2), WP to diaspora* (1.5.3), Yoast SEO (2.3.5)
– site : http://drivrsdu.frIs it possible to have a lot of forums for a group, not only one ? How ?
Thank you for your help.
I need to Hide a div based on authors pmpro role level or wp role level?
I have 2 types of account sellers and buyers
on the buddypress members page of the seller I have added a button to take them to the sellers storefrontI added this to the members-header inside my themes buddypress
<div id=”item-header-avatar2″ class=”btn btn-default” >
“> Buy Training Packages
</div>
simple button as the storefront url is always the same as the users name
however well this also adds the button to the buyers pages and they dont have a storefront 🙂
so I need a way to filter the button according to the authors/buddypress member page being viewed if the author is a buyer or pmppro level 1 WProle= subscriber then this div will not be displayed in their buddypress page
I foud this snippet for pmpro
Check for a specific user_id (i.e. not the current user).<?php
$user_id = 1; //some other user
if(pmpro_hasMembershipLevel(1, $user_id))
{
?>
//Place your HTML or PHP code here if the user is in the required membership level
…
<?php
}
?>soo…..
if(pmpro_hasMembershipLevel(1, $user_id))
should be ????
if(pmpro_hasMembershipLevel(1,bp_displayed_user_id()))
as this states it is a free pmpro level 1 member aka subscriber,buyer and the user id is drawn from the users profile page being viewed right?
so if the above pmpro function is correct how do i apply it to hide the div sorry I am new to this stuff and lack the basic php fundamentals i guess 🙂
so if anyone can help and take my div code and show me how to hide it by the authors role either wp role of pmpro role just need to hide the store front button if the user doesnt have a store . thanks
Is there a way with buddypress to protect normal pages i have created from being viewed by users who are not logged into buddypress ?
BP is a small part of my website and i want to create 3 form pages which are not viewable by users who are not logged in ?
Hi,
I want to remove all buddypress pages like members, profile ], groups pages from google search index. Im using yoast plugin.please help
Thanks