Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'how to hide pages'

Viewing 25 results - 1 through 25 (of 250 total)
  • Author
    Search Results
  • #249756
    Profile photo of bareguys
    bareguys
    Participant

    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?

    Profile photo of ShortieD
    Sofia Woods
    Participant

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

    #248631
    Profile photo of timsilva_
    timsilva_
    Participant

    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/

    #248412

    In reply to: Private Pages Glitch?

    Profile photo of fscbmwcca
    fscbmwcca
    Participant

    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.

    #248133
    Profile photo of Max Zhubr
    Max Zhubr
    Participant

    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:

    <?php
    /*
    Plugin Name: BuddyPress: My Events
    Description: Adds an Events tab to your user profiles.
    Plugin URI: http://premium.wpmudev.org/project/events-and-booking
    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;
    		$me->_add_hooks();
    	}
    
    	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) .
    			'</p></div>';
    		}
    	}
    
    	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;
    		bp_core_new_nav_item(array(
    			'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()) {
    			bp_core_new_subnav_item(array(
    				'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'),
    			));
    		}
    		bp_core_new_subnav_item(array(
    			'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'),
    		));
    		bp_core_new_subnav_item(array(
    			'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'),
    		));
    		bp_core_new_subnav_item(array(
    			'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'),
    		));
    		do_action('eab-events-my_events-set_up_navigation');
    	}
    
    	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) .
    		'</div>';
    		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) .
    		'</div>';
    		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) .
    		'</div>';
    		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) .
    		'</div>';
    		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();
    		$tips->set_icon_url(plugins_url('events-and-bookings/img/information.png'));
    		$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>
    	    </div>
    	</div>
    </div>
    <?php
    	}
    
    	function save_settings ($options) {
    		$options['bp-my_events-premium_events'] = $_POST['event_default']['bp-my_events-premium_events'];
    		return $options;
    	}
    }
    
    Eab_BuddyPress_MyEvents::serve();
    
    class Eab_MyEvents_Shortcodes extends Eab_Codec {
    
    	protected $_shortcodes = array(
    		'my_events' => 'eab_my_events',
    	);
    
    	public static function serve () {
    		$me = new Eab_MyEvents_Shortcodes;
    		$me->_register();
    	}
    
    	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']) .
    			'</div>';
    		}
    
    		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']) .
    			'</div>';
    		}
    
    		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']) .
    			'</div>';
    		}
    
    		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']) .
    			'</div>';
    		}
    
    		$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;
    	}
    }
    
    Eab_MyEvents_Shortcodes::serve();

    Thanks in advance!

    #246331
    Profile photo of Lacod
    Lacod
    Participant

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

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

    Thank you for your help.

    #245719
    Profile photo of danbp
    danbp
    Moderator

    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 trato111.org 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
    rpandassociates
    Participant

    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

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

    Profile photo of Jld142
    Jld142
    Participant

    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 ?

    #245286
    Profile photo of renatokeuller
    renatokeuller
    Participant

    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:

    http://cetps-pa.com.br/menu1.jpg

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

    http://cetps-pa.com.br/menu2.jpg

    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:

    http://cetps-pa.com.br/menu3.jpg

    Ie an extra menu below to display only pages BP.

    Is Possible?

    #244529
    Profile photo of djsteveb
    djsteveb
    Participant

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

    #244254
    Profile photo of djsteveb
    djsteveb
    Participant

    @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…” –
    ( http://premium.wpmudev.org/forums/topic/bp-meta-tite-description-for-groups-and-members-pages#post-806736 )
    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.

    #244220
    Profile photo of Nithin K Varrier
    Nithin K Varrier
    Participant

    Hi,

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

    Thanks

    Profile photo of zoewsaldana
    zoewsaldana
    Participant

    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!

    #241765
    Profile photo of ghar123
    ghar123
    Participant

    Hello,

    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!

    #241200
    Profile photo of Gnostic_Thought
    Gnostic Thought
    Participant

    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.

    #240656
    Profile photo of bzwb
    bzwb
    Participant

    Is it possible to hide buddypress pages from online scanners especially Sucuri Site Check? A scan with Sucuri reveals all pages and exposes group member’s names even if you can’t navigate to the page.

    Solution by code edit or plugin will be deeply appreciated.

    Profile photo of The Dux
    The Dux
    Participant

    Hi.

    Sorry if this has been answered, but how would I hide, or rather stop from being generated in the first place, the members header (avatar and all) for pages like my-messages?

    I know how to with css, but I feel it would be better to stop it from being generated in the first place if possible. Also I need to learn.

    Thanks to whoever takes the time!

    #239078
    Profile photo of DewFL
    DewFL
    Participant

    Hi,

    Is there a way to hide the sidebars from pages such as the registration page and user profiles? When creating these pages I have selected not to display the sidebars but all BuddyPress pages display them, they won’t respect my settings, other pages on my site not related to BuddyPress do follow my settings? Is there a way to accomplish this?

    Any help would be greatly appreciated!

    Profile photo of jkin
    jkin
    Participant

    Hi, I am using buddypress + bbpress, with userpro in a theme called Magmik.
    The setting for buddypress, bbpress, and userpro seems to be ok, however, I am don’t know how to make sure for these, although I have released my order to the theme company to set it up for me.

    My question here is that, due to the userpro, the message in the admin board keeps showing:
    The following active BuddyPress Components do not have associated WordPress Pages: Activate, Register. Repair.

    I am told that I am using userpro to replace both the Activate and Register pages, therefore, there is no issue in here, it seems.

    however, my problem is the message in the backend of the website.
    Please advise how could I hide this message in my dashboard for administrator.

    Versions are:
    WordPress 4.2.2
    buddypress: 2-2-3-1
    bbpress: 2.5.7
    The website is: http://www.enihongo.net/

    Please help. thanks.
    Kay

    #238807
    Profile photo of JLHart972
    JLHart972
    Participant

    Hello!

    Would there happen to be an easy way to hide the page titles on profile and group pages only? I’d like to get rid of them with css but the theme I’m using has general page titles on them.

    The website I’m working on isn’t hosted yet but here is a link to a demo profile using the theme.
    https://buddywp.wpengine.com/buddypress/members/buddywp/

    Any advice would be greatly appreciated.

    #238546
    Profile photo of caniwigirl
    caniwigirl
    Participant

    Last year, @bp-help posted a useful bit of code that prevents non-logged in users from accessing BuddyPress pages… an I believe extended these to forums.

    Unfortunately during all the updates since I got it going a couple weeks ago… this solution no longer seems to work. Any ideas?

    Here is the original code from that post… it goes inside functions.php

    /* 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_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);
    #237969
    Profile photo of mantismamita
    mantismamita
    Participant

    First of all I am using WordPress 4.1.1 and BuddyPress 2.2.2.1 and I am creating custom templates (via a custom plugin) that show Members based on roles. For example I want to have one page of only subscribers and another of only contributors. I have found a few different ways to doing this the simplest being to add a conditional statement like so

    $user = new WP_User( bp_get_member_user_id() );
    
                if ( $user->roles[0] =='subscriber'){ ?>

    within the bp members loop.

    The problem with this is that the pagination is skewed and is based on all the members instead of just those with the correct role. For example if I have 2000 members and only 5 of them are subscribers I will have pagination based on the 2000 where most pages are blank.

    I’ve read suggestions to modify the bp_members_pagination_count() but it seems that changing the parameters of bp_has_members() would be more efficient. Therefore I would need to modify bp_ajax_querystring( 'members' ) in ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) :

    I saw this thread by @zintax and modified it to suit my needs like so:

    function modify_members_loop( $qs=false, $object=false ) {
    
        if ( $object != 'members' ) // hide for members only
            return $qs;
    
        // create an array with my subscribed users
        $subscribers = get_users( 'role=subscriber' );
        $sub_list= array();
    
        foreach ( $subscribers as $sub ){
            $sub_list[]= $sub->ID;
        }
    
        $sub_list = implode(', ', $sub_list);
    
        if ( !empty( $args['include'] ) )
            $args['include'] = $args['include'] . ',' . $sub_list;
        else
            $args['include'] = $sub_list;
    
        $qs = build_query($args);
        return $qs;
    }
    
    add_action( 'bp_ajax_querystring' , 'modify_members_loop', 25, 2 );

    (I will later add conditionals so that this only occurs on the subscriber page)

    I was wondering if this is indeed the best and most query efficient way to go about this or if there are other considerations I should be mindful of.

    Profile photo of djsteveb
    djsteveb
    Participant

    @morka – do you have the same issue when using the default “wordpress 2014” or “twenty-twelve” themes?
    If not, I would ask your theme author to add some kind of check on pages for something like “if is register page, turn off comments” / not load the comment hook thing…

    sorry not a php or wp/bp expert, can’t point you in the right direction for those codes and what they are really called. I know with some standard WP pages you can go into the editor and select “comments off / disable trackbacks” – and with some themes you can use a theme option to “display comments off” or hide “comments off” on pages where comments are disallowed.

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