Skip to:

Search Results for 'how to hide pages'

Viewing 25 results - 1 through 25 (of 258 total)
  • Author
    Search Results
  • #257573
    Profile photo of NormadSoul

    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 ?


    Thank you

    Profile photo of siparker

    For anyone who is looking for the solution for not being able to save buddypress settings.

    Various plugins cause issues with adding various extra css in the admin area.

    in my case there was a css file from a Codecanyon Woozone plugin which hid the P tags in the buddypress options pages

    use firebug and find the bottom div that cotnains the submit button and disable any css that is hiding it and you can click the submit button.

    after you have done that you might want to tell the plugin developer that caused the issue about it.

    TLDR the button is there its probably just hidden. use firebug or chrome tools to unhide it and click save.

    Profile photo of bertl11


    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

    Profile photo of bryanbatcher

    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.2

    Profile photo of damagomez

    Hello, 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 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
    Protect My Contents
    Quick Page/Post Redirect Plugin
    SB Welcome Email Editor
    SiteOrigin Widgets Bundle
    Title Remover
    Wordfence Security
    WordPress Access Control
    WP Bouncer
    WP Maintenance Mode

    Thanks in advance for your help!

    Profile photo of giorginho10495

    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

    Profile photo of Swennet

    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?

    Profile photo of jrb9406

    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!

    Plugin Name: Paid Memberships Pro – Email Confirmation Add On
    Plugin URI:
    Description: Require email confirmation before certain levels are enabled for members.
    Version: .3
    Author: Stranger Studios
    Author URI:
    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);
    $email_confirmation = false;
    <h3 class=”topborder”>Email Confirmation</h3>
    <tbody class=”form-table”>
    <th scope=”row” valign=”top”><label for=”email_confirmation”><?php _e(‘Email Confirmation:’, ‘pmpro’);?></label></th>
    <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>
    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)
    $email_confirmation = intval($_REQUEST[’email_confirmation’]);
    $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”);

    //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;

    //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)
    $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
    return $hasaccess;

    //if this isn’t locked by level, ignore this
    return $hasaccess;

    //does this user have a level that requires confirmation?
    $user_membership_level = pmpro_getMembershipLevelForUser($myuser->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 member

    if(preg_match($check, $uri))
    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)
    update_user_meta($user->ID, “pmpro_email_confirmation_key”, “validated”);

    do_action(‘pmproec_after_validate_user’, $user->ID, $validate);


    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’);
    //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);
    $url .= “&s=” . esc_attr($_REQUEST[‘s’]);
    $url .= “&paged=” . intval($_REQUEST[‘paged’]);
    $url = wp_nonce_url($url, ‘pmproecvalidate_’ . $user->ID);
    $actions[] = ‘Validate User‘;
    $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()
    global $pmproec_msg, $pmproec_msgt;

    //get user id
    $user_id = intval($_REQUEST[‘pmproecvalidate’]);
    $user = get_userdata($user_id);

    //no user?
    //user not found error
    $pmproec_msg = ‘Could not reset sessions. User not found.’;
    $pmproec_msgt = ‘error’;
    //check nonce
    check_admin_referer( ‘pmproecvalidate_’.$user_id);

    //check caps
    $cap = apply_filters(‘pmproec_validate_user_cap’, ‘edit_users’);
    //show error message
    $pmproec_msg = ‘You do not have permission to validate users.’;
    $pmproec_msgt = ‘error’;
    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;
    echo “<div class=\”$pmproec_msgt\”><p>$pmproec_msg</p></div>”;
    add_action(‘admin_notices’, ‘pmproec_admin_notices’);

    Profile photo of aswain1

    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, and every time after the first click, it shows 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 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!

    Profile photo of bareguys


    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?

    Profile photo of ShortieD
    Sofia Woods

    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.

    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’ );

    Profile photo of timsilva_

    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>


    <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:


    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:


    In reply to: Private Pages Glitch?

    Profile photo of fscbmwcca

    I know the plugin doesn’t address my issue but keeps BuddyPress for members only and hide it from non-logged in users. Privacy is very important to our members. I will upload the members that are truly members from a csv file from a list that is provided for me and give the Contributor Role. What I meant by subscriber is the “Subscriber” Role (vs Contributor, Author, Editor, Administrator).
    I’m sorry I haven’t expressed myself well and now off topic. I was just trying to provide a solution for making pages private.

    Profile photo of Max Zhubr
    Max Zhubr

    Hi there, All!

    How can I make a subnav with a static link in profile?
    I’ve got an Events+ plugin installed, and I’m trying to add a subnav link to the profile tab called “Events” with a static link, that should redirect to page /events/.

    Here is the code of the BP connected part of plugin:

    Plugin Name: BuddyPress: My Events
    Description: Adds an Events tab to your user profiles.
    Plugin URI:
    Version: 1.0
    AddonType: BuddyPress
    Author: WPMU DEV
    Detail: Displays lists of user RSVPs on your users member pages.
    class Eab_BuddyPress_MyEvents {
    	private $_data;
    	private function __construct () {
    		$this->_data = Eab_Options::get_instance();
    	public static function serve () {
    		$me = new Eab_BuddyPress_MyEvents;
    	private function _add_hooks () {
    		add_action('admin_notices', array($this, 'show_nags'));
    		add_action('eab-settings-after_plugin_settings', array($this, 'show_settings'));
    		add_filter('eab-settings-before_save', array($this, 'save_settings'));
    		add_action('bp_init', array($this, 'add_bp_profile_entry'));
    	function show_nags () {
    		if (!defined('BP_VERSION')) {
    			echo '<div class="error"><p>' .
    				__("You'll need BuddyPress installed and activated for My Events add-on to work", Eab_EventsHub::TEXT_DOMAIN) .
    	private function _check_permissions () {
    		$post_type = get_post_type_object(Eab_EventModel::POST_TYPE);
    		return current_user_can($post_type->cap->edit_posts);
    	function add_bp_profile_entry () {
    		global $bp;
    			'name' => __('Events', Eab_EventsHub::TEXT_DOMAIN),
    			'slug' => 'my-events',
    			'show_for_displayed_user' => true,
    			'default_subnav_slug' => ($this->_check_permissions() ? 'organized' : 'attending'),
    			'screen_function' => '__return_false',
    		if ($this->_check_permissions()) {
    				'name' => __('Organized', Eab_EventsHub::TEXT_DOMAIN),
    				'slug' => 'organized',
    				'parent_url' => $bp->displayed_user->domain . 'my-events' . '/',
    				'parent_slug' => 'my-events',
    				'screen_function' => array($this, 'bind_bp_organized_page'),
    			'name' => __('Attending', Eab_EventsHub::TEXT_DOMAIN),
    			'slug' => 'attending',
    			'parent_url' => $bp->displayed_user->domain . 'my-events' . '/',
    			'parent_slug' => 'my-events',
    			'screen_function' => array($this, 'bind_bp_attending_page'),
    			'name' => __('Maybe', Eab_EventsHub::TEXT_DOMAIN),
    			'slug' => 'mabe',
    			'parent_url' => $bp->displayed_user->domain . 'my-events' . '/',
    			'parent_slug' => 'my-events',
    			'screen_function' => array($this, 'bind_bp_maybe_page'),
    			'name' => __('Not Attending', Eab_EventsHub::TEXT_DOMAIN),
    			'slug' => 'not-attending',
    			'parent_url' => $bp->displayed_user->domain . 'my-events' . '/',
    			'parent_slug' => 'my-events',
    			'screen_function' => array($this, 'bind_bp_not_attending_page'),
    	function bind_bp_organized_page () {
    		add_action('bp_template_title', array($this, 'show_organized_title'));
    		add_action('bp_template_content', array($this, 'show_organized_body'));
    		add_action('bp_head', array($this, 'enqueue_dependencies'));
    		bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
    	function bind_bp_attending_page () {
    		add_action('bp_template_title', array($this, 'show_attending_title'));
    		add_action('bp_template_content', array($this, 'show_attending_body'));
    		add_action('bp_head', array($this, 'enqueue_dependencies'));
    		bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
    	function bind_bp_maybe_page () {
    		add_action('bp_template_title', array($this, 'show_maybe_title'));
    		add_action('bp_template_content', array($this, 'show_maybe_body'));
    		add_action('bp_head', array($this, 'enqueue_dependencies'));
    		bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
    	function bind_bp_not_attending_page () {
    		add_action('bp_template_title', array($this, 'show_not_attending_title'));
    		add_action('bp_template_content', array($this, 'show_not_attending_body'));
    		add_action('bp_head', array($this, 'enqueue_dependencies'));
    		bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
    	function enqueue_dependencies () {
    		global $bp;
    		if ('my-events' != $bp->current_component) return false;
    		wp_enqueue_style('eab-bp-my_events', plugins_url('events-and-bookings/css/eab-buddypress-my_events.css'));
    	function show_organized_title () {
    		echo __('Organized Events', Eab_EventsHub::TEXT_DOMAIN);
    	function show_attending_title () {
    		echo __('Attending Events', Eab_EventsHub::TEXT_DOMAIN);
    	function show_maybe_title () {
    		echo __('Maybe attending Events', Eab_EventsHub::TEXT_DOMAIN);
    	function show_not_attending_title () {
    		echo __('Not attending Events', Eab_EventsHub::TEXT_DOMAIN);
    	function show_organized_body () {
    		global $bp;
    		echo '<div id="eab-bp-my_events-wrapper">';
    		echo '<div class="eab-bp-my_events eab-bp-organized">' .
    			Eab_Template::get_user_organized_events($bp->displayed_user->id) .
    		echo '</div>';
    	function show_attending_body () {
    		global $bp;
    		$premium = $this->_data->get_option('bp-my_events-premium_events');
    		if (!empty($premium)) {
    			if ('nag' == $premium) add_filter('eab-event-user_events-before_meta', array($this, 'premium_event_rsvp'), 10, 3);
    			if ('hide' == $premium) add_filter('eab-event-user_events-exclude_event', array($this, 'exclude_premium_event_rsvp'), 10, 2);
    		echo '<div id="eab-bp-my_events-wrapper">';
    		echo '<div class="eab-bp-my_events eab-bp-rsvp_yes">' .
    			Eab_Template::get_user_events(Eab_EventModel::BOOKING_YES, $bp->displayed_user->id) .
    		echo '</div>';
    	function show_maybe_body () {
    		global $bp;
    		echo '<div id="eab-bp-my_events-wrapper">';
    		echo '<div class="eab-bp-my_events eab-bp-rsvp_maybe">' .
    			Eab_Template::get_user_events(Eab_EventModel::BOOKING_MAYBE, $bp->displayed_user->id) .
    		echo '</div>';
    	function show_not_attending_body () {
    		global $bp;
    		echo '<div id="eab-bp-my_events-wrapper">';
    		echo '<div class="eab-bp-my_events eab-bp-rsvp_no">' .
    			Eab_Template::get_user_events(Eab_EventModel::BOOKING_NO, $bp->displayed_user->id) .
    		echo '</div>';
    	function premium_event_rsvp ($content, $event, $status) {
    		if (!$event->is_premium()) return $content;
    		global $bp;
    		$user_id = $bp->displayed_user->id;
    		if (Eab_EventModel::BOOKING_YES != $status) return $content;
    		if ($event->user_paid($user_id)) return $content;
    		$content .= '<div class="eab-premium_event-unpaid_notice"><b>' . __('Event not paid', Eab_EventsHub::TEXT_DOMAIN) . '</b></div>';
    		return $content;
    	function exclude_premium_event_rsvp ($exclude, $event) {
    		if ($exclude) return $exclude;
    		global $bp;
    		$user_id = $bp->displayed_user->id;
    		if (!$event->is_premium()) return false;
    		return !$event->user_paid($user_id);
    	function show_settings () {
    		$tips = new WpmuDev_HelpTooltips();
    		$premium = $this->_data->get_option('bp-my_events-premium_events');
    		$options = array(
    			'' => __('Do nothing special', Eab_EventsHub::TEXT_DOMAIN),
    			'hide' => __('Hide', Eab_EventsHub::TEXT_DOMAIN),
    			'nag' => __('Show nag notice', Eab_EventsHub::TEXT_DOMAIN),
    <div id="eab-settings-my_events" class="eab-metabox postbox">
    	<h3 class="eab-hndle"><?php _e('My Events settings', Eab_EventsHub::TEXT_DOMAIN); ?></h3>
    	<div class="eab-inside">
    		<div class="eab-settings-settings_item" style="line-height:1.8em">
    	    	<label for="eab_event-bp-my_events-premium_events"><?php _e('Non-paid premium events with positive RSPVs', Eab_EventsHub::TEXT_DOMAIN); ?>:</label>
    	    	<?php foreach ($options as $value => $label) { ?>
    	    		<br />
    				<input type="radio" id="eab_event-bp-my_events-premium_events-<?php echo esc_attr($value); ?>" name="event_default[bp-my_events-premium_events]" value="<?php echo esc_attr($value); ?>" <?php checked($value, $premium); ?> />
    	    		<label for="eab_event-bp-my_events-premium_events-<?php echo esc_attr($value); ?>"><?php echo esc_html($label) ?></label>
    	    	<?php } ?>
    			<span><?php echo $tips->add_tip(__('How to deal with non-paid premium events on user events list display.', Eab_EventsHub::TEXT_DOMAIN)); ?></span>
    	function save_settings ($options) {
    		$options['bp-my_events-premium_events'] = $_POST['event_default']['bp-my_events-premium_events'];
    		return $options;
    class Eab_MyEvents_Shortcodes extends Eab_Codec {
    	protected $_shortcodes = array(
    		'my_events' => 'eab_my_events',
    	public static function serve () {
    		$me = new Eab_MyEvents_Shortcodes;
    	function process_my_events_shortcode ($args=array(), $content=false) {
    		$args = $this->_preparse_arguments($args, array(
    		// Query arguments
    			'user' => false, // User ID or keyword
    		// Appearance arguments
    			'class' => 'eab-my_events',
    			'show_titles' => 'yes',
    			'sections' => 'organized,yes,maybe,no',
    		if (is_numeric($args['user'])) {
    			$args['user'] = $this->_arg_to_int($args['user']);
    		} else {
    			if ('current' == trim($args['user'])) {
    				$user = wp_get_current_user();
    				$args['user'] = $user->ID;
    			} else {
    				$args['user'] = false;
    		if (empty($args['user'])) return $content;
    		$args['sections'] = $this->_arg_to_str_list($args['sections']);
    		$args['show_titles'] = $this->_arg_to_bool($args['show_titles']);
    		$output = '';
    		// Check if the user can organize events
    		$post_type = get_post_type_object(Eab_EventModel::POST_TYPE);
    		if (in_array('organized', $args['sections']) && user_can($args['user'], $post_type->cap->edit_posts)) {
    			$output .= '<div class="' . $args['class'] . ' eab-bp-organized">' .
    				($args['show_titles'] ? '<h4>' . __('Organized Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') .
    				Eab_Template::get_user_organized_events($args['user']) .
    		if (in_array('yes', $args['sections'])) {
    			$output .= '<div class="' . $args['class'] . ' eab-bp-rsvp_yes">' .
    				($args['show_titles'] ? '<h4>' . __('Attending Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') .
    				Eab_Template::get_user_events(Eab_EventModel::BOOKING_YES, $args['user']) .
    		if (in_array('maybe', $args['sections'])) {
    			$output .= '<div class="' . $args['class'] . ' eab-bp-rsvp_maybe">' .
    				($args['show_titles'] ? '<h4>' . __('Maybe attending Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') .
    				Eab_Template::get_user_events(Eab_EventModel::BOOKING_MAYBE, $args['user']) .
    		if (in_array('no', $args['sections'])) {
    			$output .= '<div class="' . $args['class'] . ' eab-bp-rsvp_no">' .
    				($args['show_titles'] ? '<h4>' . __('Not attending Events', Eab_EventsHub::TEXT_DOMAIN) . '</h4>' : '') .
    				Eab_Template::get_user_events(Eab_EventModel::BOOKING_NO, $args['user']) .
    		$output = $output ? $output : $content;
    		return $output;
    	public function add_my_events_shortcode_help ($help) {
    		$help[] = array(
    			'title' => __('My Events archives', Eab_EventsHub::TEXT_DOMAIN),
    			'tag' => 'eab_my_events',
    			'arguments' => array(
    				'user' => array('help' => __('User ID or keyword "current".', Eab_EventsHub::TEXT_DOMAIN), 'type' => 'string:or_integer'),
    				'class' => array('help' => __('Apply this CSS class', Eab_EventsHub::TEXT_DOMAIN), 'type' => 'string'),
    				'show_titles' => array('help' => __('Show section titles', Eab_EventsHub::TEXT_DOMAIN), 'type' => 'boolean'),
    				'sections' => array('help' => __('Show these sections. Possible values: "organized", "yes", "maybe", "no".', Eab_EventsHub::TEXT_DOMAIN), 'type' => 'string:list'),
    		return $help;

    Thanks in advance!

    Profile photo of Lacod


    config WP :

    – WordPress : 4.3.1
    – Version de PHP/MySQL : 5.6.6 /
    – Thème utilisé : Twenty Fifteen
    – Thème URI :
    – 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 (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 :

    Is it possible to have a lot of forums for a group, not only one ? How ?

    Thank you for your help.

    Profile photo of danbp

    Hi guys,

    sorry to jump in, thought you need a little help from a mediapress early adopter.
    But first, about the theme used by @caesarhills.

    About Graphene
    The theme has an option where you can hide child pages. You probably don’t need to show all your site pages listing below BuddyPress content as you use the buddy menu.
    dashboard > appearance > graphene options. Tab General > child page option, select hide listing.

    About Mediapress
    @venutius, @caesarhills
    You don’t need to use a shortcode to get a list off existing galleries. This is default behave.

    Caesar, you use BP on network. When you use mediapress, take in account this remark from MP’s author:
    If you don’t want to have a separate MediaPress Installation for all the sites, please do not network activate MediaPress. Only activate it on your Main BuddyPress site.

    Currently, MediaPress does not support BuddyPress Multiblog Mode.

    MediaPress is best suited on a Multisite install if you activate it on main site or network activate if you are using BuddyPress Multi Network plugin.

    1) When you install a directory uploaded on Github (which is the case of mediapress), github add automatically -master to that folder. You have to remove that when you add the directory to wp-content/plugins/. So to get mediapress working correctly, ensure that the plugin path is
    wp-content/plugins/mediapress/ and not wp-content/plugins/mediapress-master like it is setted on actually

    2) activate mediapress like any other plugin. When BP is installed, you get a message telling mediapress has no page associated to it. Click on repair and add a page manually. Call it ‘album’. Then assign this page to MediaPress component on BuddyPress > settings > pages. Save.

    Return to front and reload it. Now you should see a menu item called Album beside Activity, Groups, etc. on the main menu.

    Click and you see an empty Album page with the usual search filter for galleries, a sort filter for galleries and a little message telling you “There are no galleries available!”.

    Again, that’s the default behave. Note that i didn’t evoquate mediapress settings. I described you only what happens when you install mediapress by default.

    For more in-deep details, please refer to MediaPress documentation.

    And if you want to use shortcodes, do it after reading this doc.

    Profile photo of rpandassociates

    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 storefront

    I added this to the members-header inside my themes buddypress

    <div id=”item-header-avatar2″ class=”btn btn-default” >
    “> Buy Training Packages


    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).

    $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



    if(pmpro_hasMembershipLevel(1, $user_id))

    should be ????


    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

    Profile photo of Jld142

    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 ?

    Profile photo of renatokeuller

    Hello @venutius

    As for whether to hide the pages of menus to unregistered users I could already solve using the plugin WORDPRESS ACCESS CONTROL.

    I added the three BP pages that wish is only for users registered on my primary menu and looked like this:

    When no user is logged in, the menu will be normal so only to common pages without appearing BP pages:

    Until then, fine. But my biggest challenge is to leave as soon as this I created in Photoshop to simulate how you would like to stay:

    Ie an extra menu below to display only pages BP.

    Is Possible?

    Profile photo of djsteveb

    @yespapa – there have been several posts in the forums about restricting views of various pages based upon logged in / logged out. I can’t remember any of the solutions, if there were any at this moment.

    I think you need to establish first which pages will be viewable by public / not viewable unless logged in – and make sure your language is correct / thorough.

    eg – in wordpress world “pages” are like “static pages” – they end up in nav menus, not in the blog “loop” – etc.. blog posts are posts.. and in bp world stuff like profiles, groups, are kind of “pseudo pages” – which are not easy to hide with standard user role / permission plugins like “press permit core” – and I’m not sure if s2member has started to be able to lockdown bp’s psuedo pages..

    there are some details posted by others in the other threads that have alredy discussed this kind of thing.

    Profile photo of djsteveb

    @nithin270 – any changes you make for search spiders is going to take weeks (at minimum) before they are reflected in the search results.

    I suggest doing some robots.txt additions (will list mine below) – however realize that long ago google made a decisions that even if your robots.txt says to disallow crawling something, if another page on the web links to your subpage that is blocked by robots.txt, it will still show the url in the search results – but have a description something like “this sites robots.txt prevents google from displaying description of this result”.

    There has been debate about that decision, but it is what it is.

    The only way to really prevent a page showing up in results is to hide it behind a password (like htpasswd) – however google does normally remove results if that page (or header info of images) includes “noindex” in the head of the page (there is a tricky way to add this to images – it was pointed out to me in the google webmaster forums)

    given that bp pages like members are kind of pseudo pages, using something like yoast (currently as far as I know) – will not give you an option to add noindex, nofollow to your member pages..

    you may be able to modify the code I got from wpmudev that checks “if is member page, then add meta description as…” –
    ( )
    to… also check “if is members page” – then add “meta name=”robots” content “noindex, nofollow”..
    (something like that)

    that should remove your members pages next time google crawls your site and the crawlers send the info back to the main algo/index..

    I think there is a way to log into google webmaster tools if you have claimed /verified your site and click on urls to ask the big G to remove them as well. (I have not messed with that stuff in a while )

    I also suggest adding a robots.txt file similar to this:

    Disallow: */activity/p/*
    Disallow: /docs/
    Disallow: *send-invites*
    Disallow: */groups/*members*
    Disallow: */groups/*media*
    Disallow: *widget-title*
    Disallow: *members/*activity*
    Disallow: *members/*notifications*
    Disallow: *members/*friends*
    Disallow: *members/*groups*
    Disallow: *members/*docs*
    Disallow: *members/*media*
    Disallow: *acpage*
    Disallow: *messages*
    Disallow: *friends*
    Disallow: *settings*
    Disallow: /*/comment-page*
    Disallow: *register*
    Disallow: *login*
    Disallow: *profile*
    Disallow: *admin*
    Disallow: *includes*
    Disallow: *content*

    to prevent some other quirky indexing issues with bp.

    If your member profile stuff is sacred, then I would hunt the forums here for what others have been messing with that prevents profile info from being displayed if a user is not logged in… as there are plenty of indexing spiders that will not follow the robots.txt or robots index rules in <head> – in fact some specifically look for these things and purposely crawl and scrape stuff that is blocked –

    Disclaimer: I am not an expert, not a real coder. Research these things with other sources, your situation may vary.

    Profile photo of Nithin K Varrier
    Nithin K Varrier


    I want to remove all buddypress pages like members, profile ], groups pages from google search index. Im using yoast plugin.please help


    Profile photo of zoewsaldana

    Fixed it!! Okay, for anyone who encounters this issue, the problem was that for some reason (I think perhaps how WP or my server is caching pages) the hooks I was choosing to target for the behavior weren’t working. So instead I added both functions to the “wp” hook, and now it works site-wide!

    /* You can add custom functions below, in the empty area
    =========================================================== */
    function bp_guest_redirect( $name ) {
        if( ! is_user_logged_in() ) {
            if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_directory() || bp_is_user() || bp_is_members_component() ) 
                wp_redirect( get_option('siteurl') . '/new_member/' );
    add_action( 'wp', 'bp_guest_redirect', 1, 1 );
    function bpfr_hide_rss_feed_to_nonreg_visitor() {
     if ( !is_user_logged_in() ) { 	
       remove_action( 'bp_actions', 'bp_activity_action_sitewide_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_personal_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_friends_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_my_groups_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_mentions_feed' );
       remove_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
       remove_action( 'groups_action_group_feed', 'groups_action_group_feed' ); 
    add_action('wp', 'bpfr_hide_rss_feed_to_nonreg_visitor'); 

    My theme framework (WPZoom) also recommended I place theme modifying code in the functions/user/ pathway, so I modified functions.php there instead of using bp-custom. I think it would work either place, however.

    Thank you!

    Profile photo of ghar123


    I am attempting to create a private community with a forum that can only be seen by paid members. I also want a website that can be seen with a few pages. I am using Paid Membership Pro to deal with signing up and collecting payments from members. I do not know a way where I can hide the forum pages from the public and restrict access to forum pages for Paid Members only.

    Thanks for all the help!

    Profile photo of Gnostic_Thought

    I am not sure. I bought a plugin from codecanyon and am trying to alter it to work with buddypress. I think this is the code I will have to alter

    public function __construct() {
    		$this -> admin = WP_Atr_Admin :: get_instance();
    		# registration hooks:
    		add_action( 'login_enqueue_scripts', array( $this, 'initialize_registration' ) );
    		add_action( 'register_form', array( $this, 'add_checkboxes_to_registration' ) );
    		add_filter( 'registration_errors', array( $this, 'validate_registration' ), 10, 3 );
    		# mu
    		add_action( 'signup_header', array( $this, 'initialize_registration' ) );
    		add_filter( 'wpmu_validate_user_signup', array( $this, 'mu_validate_registration' ), 10, 3 );
    		add_action( 'signup_extra_fields', array( $this, 'mu_add_checkboxes_to_registration' ) );
    		# add button
    		add_filter( 'the_content', array( $this, 'add_button_to_pages' ) );
    		$this -> register_page_status();
    		if( is_multisite() ) {
    			add_filter( 'all_plugins', array( $this, 'hide_plugin_in_mu_sites' ) );

    I would figure I would prefix bp_ to some of the code here

    # registration hooks:
    add_action( ‘bp_login_enqueue_scripts’, array( $this, ‘initialize_registration’ ) );
    add_action( ‘bp_register_form’, array( $this, ‘add_checkboxes_to_registration’ ) );
    add_filter( ‘bp_registration_errors’, array( $this, ‘validate_registration’ ), 10, 3 );

    but it like there is more to it than that according to your link.

Viewing 25 results - 1 through 25 (of 258 total)
Skip to toolbar