Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'how to hide pages'

Viewing 25 results - 1 through 25 (of 236 total)
  • Author
    Search Results
  • #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.

    Profile photo of danbp
    danbp
    Moderator
    Profile photo of Rosyteddy
    rosyteddy
    Participant

    @minglonaire you can also try https://bp-tricks.com/design/easily-hide-specific-tabs-on-buddypress-member-and-group-pages/ AND remove Activity from Themes > Menu in your wordpress admin dashboard

    Profile photo of danbp
    danbp
    Moderator

    Try this to remove ALL activity feeds

    function bpfr_hide_rss_feeds() {	
       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('init', 'bpfr_hide_rss_feeds');

    This snippet will only show logged in users friends activities (on all activity pages of the site)

    
    function bpfr_filtering_activity( $retval ) {
    	$retval['scope'] = 'friends';		
    		return $retval;
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'bpfr_filtering_activity' );

    Add to bp-custom.php or child-theme functions.php

    More details about this on Codex

    #235465
    Profile photo of danbp
    danbp
    Moderator

    my snippet hides buddybar items to non logged user, not BP usermenu items on Toolbar.

    To do that, you have to read the codex document i indicated in one of previous post.

    BuddyMenu is built a la BuddyPress. And you got support for this here.

    Toolbar is built a la WordPress. WP support is here.

    If you had looked a little on the forum (ie. Remove Edit My Profile), you could find this:
    https://buddypress.org/support/topic/remove-edit-my-profile/#post-150939

    And again, the one or other code doesn’t remove BP pages, only items.

    Profile photo of SimpleOne
    SimpleOne
    Participant

    How do I go about preventing the site’s page header and footer areas from appearing on the BuddyPress Register page?

    I know how to hide the display of the header/footer using CSS, but that solution won’t suffice for my needs. You see, I’m using SSL on my Login and Registration pages. And the images I have in my header and footer are “breaking” the SSL since they’re deemed insecure content. So I’ve decided that I would just prefer to completely remove the header/footer on the Register page only. But how do I do that?

    FYI, I created a custom WP page template that removed any reference to header/footer, but I still see the header/footer appear on the Register page.

    Also, I noticed in the register.php file that there’s no reference to get_header( ), so I’m unclear as to why the header is still being displayed when I removed it from the WP page template I’ve associated to the Register page. My site is using BP version 2.0.2.

    Please help! Thank you!

    #234287
    Profile photo of tobyhawkins
    Toby
    Participant

    Actually I should clarify, this isn’t happening on members or groups index pages. It’s subpages of these. It seems to be something to do with get_queried_object()? I’m starting to show my hideous ignorance at this point though.

    Profile photo of evitorino
    evitorino
    Participant

    My wordpress is 4.1 and Buddypress 2.1.1

    Hello Community,

    I am having a problem with a custom member page pagination, when clicking link to pagination page 2, pagination takes us to page 2 and adds the string “?upage=2″ to the site URL.

    After that, clicking page 1 or back symbol on pagination links does nothing, only refreshes page.

    Problematic page: http://wp1.kodeserver.net/coach/
    I have set the page above in Twentyfifteen theme as to exclude any third party theme related errors.

    If we use the default member page “http://wp1.kodeserver.net/members/” then pagination works ok.

    I believe the error might be caused by the member filter i made or maybe i messed up the template.

    Hope you can help.

    Below is the code i am using:

    functions that i use to filter member loop by member types on the site:

    function bp_exclude_users_but_player() {
    $excluded_users_but_player = implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_player = $excluded_users_but_player.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_player;
    }

    function bp_exclude_users_but_coach() {
    $excluded_users_but_coach = implode(',',get_users('role=player&fields=ID'));
    //$excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=seniorcoach&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_coach = $excluded_users_but_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_coach;
    }

    function bp_exclude_users_but_senior_coach() {
    $excluded_users_but_senior_coach = implode(',',get_users('role=player&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=coach&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_users_but_senior_coach = $excluded_users_but_senior_coach.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_users_but_senior_coach;
    }

    function bp_exclude_cc_backend_users() {
    $excluded_cc_backend_users = implode(',',get_users('role=subscriber&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=editor&fields=ID'));
    $excluded_cc_backend_users = $excluded_cc_backend_users.','.implode(',',get_users('role=administrator&fields=ID'));
    return $excluded_cc_backend_users;
    }

    Member Loop that calls member “Coach” filter:
    <?php if ( bp_has_members( bp_ajax_querystring( 'members').'&exclude='.bp_exclude_users_but_coach().'&per_page=24' ) ) : ?>

    And this is the problematic page template code (The one that filters by role type (coach))

    <?php
    /**
    * The template for displaying all pages
    *
    * This is the template that displays all pages by default.
    * Please note that this is the WordPress construct of pages and that
    * other 'pages' on your WordPress site will use a different template.
    *
    * @package WordPress
    * @subpackage Kleo
    * @since Kleo 1.0
    */

    get_header(); ?>

    <?php get_template_part('page-parts/general-title-section'); ?>

    <?php get_template_part('page-parts/general-before-wrap'); ?>

    <?php
    if ( have_posts() ) :
    // Start the Loop.
    while ( have_posts() ) : the_post();
    /*
    * Include the post format-specific template for the content. If you want to
    * use this in a child theme, then include a file called called content-___.php
    * (where ___ is the post format) and that will be used instead.
    */
    get_template_part( 'content', 'page' );
    endwhile;
    endif;
    ?>

    <?php do_action( 'bp_before_directory_members_page' ); ?>
    <section class="container-wrap main-color">
    <div class="section-container container">

    <div id="buddypress">

    <?php do_action( 'bp_before_directory_members' ); ?>

    <?php do_action( 'bp_before_directory_members_content' ); ?>

    <!--<div id="members-dir-search" class="dir-search" role="search">
    <?php //bp_directory_members_search_form(); ?>
    </div>--><!-- #members-dir-search -->

    <?php do_action( 'bp_before_directory_members_tabs' ); ?>

    <form action="" method="post" id="members-directory-form" class="dir-form">

    <div id="subnav" class="item-list-tabs" role="navigation">

      <!--<li class="selected" id="members-all">"><?php //printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?>--> <!--Contatore membri totali-->

      <?php //if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
      <!--<li id="members-personal">"><?php //printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>-->
      <?php //endif; ?>

      <?php //do_action( 'bp_members_directory_member_types' ); ?>

      <?php //do_action( 'bp_members_directory_member_sub_types' ); ?>

      <!--<li id="members-order-select" class="last filter">
      <label for="members-order-by"><?php //_e( 'Order By:', 'buddypress' ); ?></label>
      <select id="members-order-by">
      <option value="active"><?php //_e( 'Last Active', 'buddypress' ); ?></option>
      <option value="newest"><?php //_e( 'Newest Registered', 'buddypress' ); ?></option>

      <?php //if ( bp_is_active( 'xprofile' ) ) : ?>
      <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
      <?php //endif; ?>

      <?php //do_action( 'bp_members_directory_order_options' ); ?>
      </select>
      -->

    </div><!-- .item-list-tabs -->

    <div id="members-dir-list" class="members dir-list">

    <?php

    /**
    * BuddyPress - Members Loop
    *
    * Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    */

    ?>

    <?php if ( bp_has_members( bp_ajax_querystring( 'members').'&exclude='.bp_exclude_users_but_coach().'&per_page=24' ) ) : ?>

    <div id="pag-top" class="pagination">
    <div class="pag-count" id="member-dir-count-top">
    <?php bp_members_pagination_count(); ?>
    </div>
    <div class="pagination-links" id="member-dir-pag-top">
    <?php bp_members_pagination_links(); ?>
    </div>
    </div>

    <?php do_action( 'bp_before_directory_members_list' ); ?>

    <ul id="members-list" class="item-list row kleo-isotope masonry">

    <?php while ( bp_members() ) : bp_the_member(); ?>

    <?php $user_info = get_userdata(bp_get_member_user_id()); ?>
    <?php
    $user_roles = $user_info->roles;
    $user_role = array_shift($user_roles);

    // echo 'User ID: ' . $user_info->ID . "\n";
    // echo bp_core_get_user_displayname( $user_info->ID ) ;
    // echo $user_info->ID ;
    ?>

    <li class="kleo-masonry-item type-<?php echo $user_role; ?>">

    ID ; ?>' value='show/hide'> <!-- link che apre info's nascoste -->

    <div class="member-inner-list animated animate-when-almost-visible bottom-to-top">

    <div class="item-avatar rounded">
    <!--
    ">
    --> <?php bp_member_avatar( 'type=full&height=150&width=150' ); ?>
    <!--
    -->
    <?php //do_action('bp_member_online_status', bp_get_member_user_id()); ?>
    </div>
    <!-- "> -->
    <div class="item">
    <div class="item-title"><span class="loop-nome"><?php bp_member_name(); ?></span><span class="loop-cognome"><?php bp_member_profile_data( 'field=Cognome' ); ?></span></div>

    <!-- <?php if ( bp_get_member_latest_update() ) : ?>
    <span class="update"> <?php bp_member_latest_update(); ?></span>
    <?php endif; ?>
    -->
    <?php do_action( 'bp_directory_members_item' ); ?>

    <?php
    /***
    * If you want to show specific profile fields here you can,
    * but it'll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( 'field=the field name' );
    */
    ?>

    </div>

    </div><!--end member-inner-list-->
    <!-- link che apre informazioni nascoste -->
    <div id="contenuto-nascosto-<?php echo $user_info->ID ; ?>" class="hidden-infos">
    <div class="nascondi-infos">
    ID ; ?>' value='show/hide'>
    <i class="icon-cancel"></i>

    </div>
    <div class="unhidden-infos unhidden-infos-first ">
    <div class="item-avatar-small">
    ">
    <?php bp_member_avatar( 'type=full&height=50&width=50' ); ?>

    <?php do_action('bp_member_online_status', bp_get_member_user_id()); ?>
    </div>
    </div>
    <div class="unhidden-infos">
    <div class="item-title">
    ">
    <span class="loop-nome"><?php bp_member_name(); ?></span>

    ">
    <span class="loop-cognome"><?php bp_member_profile_data( 'field=Cognome' ); ?></span>

    </div>
    </div>
    <div class="unhidden-infos">
    <span class="nomeazienda-titolo custom-title">Azienda:</span>
    <span class="nomeazienda custom-infos"><?php bp_member_profile_data( 'field=Azienda' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="pos-lavorativa-title custom-title">Funzione:</span>
    <span class="pos-lavorativa custom-infos"><?php bp_member_profile_data( 'field=Funzione' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="settore-title custom-title">Settore:</span>
    <span class="settore custom-infos"><?php bp_member_profile_data( 'field=Settore' ); ?></span>
    </div>
    <div class="unhidden-infos">
    <span class="laurea-title custom-title">Laurea:</span>
    <span class="laurea custom-infos"><?php bp_member_profile_data( 'field=Laurea' ); ?></span>
    </div>

    <div class="action">

    <div class="generic-button" id="send-private-message">
    " title="Clicca per profilo completo" class="send-message">Profilo Completo
    </div>

    <?php //do_action( 'bp_directory_members_actions' ); ?>

    </div>
    </div>

    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#nascondi-mostra-<?php echo $user_info->ID ; ?>').live('click', function(event) {
    jQuery('#contenuto-nascosto-<?php echo $user_info->ID ; ?>').toggle('show');
    });
    });
    </script>

    <?php endwhile; ?>

    <?php do_action( 'bp_after_directory_members_list' ); ?>

    <?php bp_member_hidden_fields(); ?>

    <?php else: ?>

    <div id="message" class="info">
    <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
    </div>

    <?php endif; ?>

    <?php do_action( 'bp_after_members_loop' ); ?>

    </div><!-- #members-dir-list -->

    <?php do_action( 'bp_directory_members_content' ); ?>

    <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>

    <?php do_action( 'bp_after_directory_members_content' ); ?>

    </form><!-- #members-directory-form -->

    <?php do_action( 'bp_after_directory_members' ); ?>

    </div><!-- #buddypress -->

    </div>
    </section>

    <?php do_action( 'bp_after_directory_members_page' ); ?>

    <?php get_template_part('page-parts/general-after-wrap'); ?>

    <?php get_footer(); ?>

    #233395
    Profile photo of bazaarocommunity
    bazaarocommunity
    Participant

    I have several custom post types on my website that are not working correctly with a category search filter (http://docs.designsandcode.com/search-filter/) and BuddyPress. For example, I have applied the following code to one of my pages:

    <?php echo do_shortcode(‘[searchandfilter fields=”encyclopedia-category,post_date” types=”select,daterange” hierarchical=1 hide_empty=1 submit_label=”Filter”]’); ?>

    This is intended to filter “Encyclopedia” post types by category (http://dennishoppe.de/en/wordpress-plugins/encyclopedia). The filter works perfectly on my category and single page, but fails on the archive page.

    The issue is somehow connected to BuddyPress because when I set the BuddyPress Activity Stream page as my homepage, the filter stops working and redirects me to my home page and displays something similar to the following in the URL rather than displaying the category page as appropriate:

    https://sandbox.stratics.com/?encyclopedia-category=slug

    However, when I use any other static page as the homepage (such as a standard homepage instead of the Activity Stream), the filter starts working again. I suspect this has something to do with the way the search filter uses permalinks and the way BuddyPress treats permalinks when it is used as a homepage, but I am at a loss at this point.

    The filter works just fine for my normal posts, but not for custom posts.

    #233352
    Profile photo of chatty24
    chatty24
    Participant

    @danbp
    I have edited the code a bit and now it is getting displayed on all the pages as I wanted but, How can I hide the modified title when the notification count is 0. By current code is below –

    function bpfr_add_notification_to_page_title( $title, $original_title, $sep, $seplocation  ) {
    	global $bp;
    	if( bp_is_user() && ! bp_get_member_user_id() ) {
            $user_id = 'displayed: '. bp_displayed_user_id();
        } else {
            $user_id = 'get_member_user: '. bp_get_member_user_id();
        }
    
    	if (bp_notifications_get_unread_notification_count( $user_id ) ) {
    
    		$counter = 0;
    			for ( $i = 0; $i < count($notifications); $i++ ) {
    				echo $notifications[$i];
    			$counter++;
    			}	
    
    	
    		
    			$title = "You Have " . bp_notifications_get_unread_notification_count() . " New Notification(s) - ";
        
    		return $title;
    	}
    }
    add_filter( 'wp_title', 'bpfr_add_notification_to_page_title', 9, 4 );
    

    Thanks

    Profile photo of screampuff
    screampuff
    Participant

    Thanks for the reply. I made some changes to the code before reading and was able to accomplish removing the tab from buddypress profiles with this:

    function hide_achievements_from_users() {
    global $bp;
    if ((bp_loggedin_user_id() == bp_displayed_user_id()) || (current_user_can('administrator'))){
    return;
    }
    bp_core_remove_nav_item('achievements');
    }
    add_action( 'bp_setup_nav', 'hide_achievements_from_users', 99 );

    However I’m stuck on how to 404 the pages if they manually type out the URL

    In your code I see:

        // I guess we should 404 this page because this member isn't an admin or the displayed member.
        $wp_query->set_404();
        status_header( 404 );
        nocache_headers();

    How do I get this to apply only when it is http://mysite.com/members/<username>/achievements?

    #231036
    Profile photo of danbp
    danbp
    Moderator

    Tempera theme was recently updated and normally you haven’t to use the old buddybar.
    So the define is of no utility… (see ticket)

    BP use now the WordPress Toolbar.

    It looks also that you have 2 activity pages, 2 members page and 2 groups page. There should be only one. See if you have deleted pages, and clear the trash.
    Also set up the pretty permalinks (anything but default), or at least re-save that setting page.

    Finally, make a test with one of wp’s default theme, bring anything to work, before activating Tempera.

    I use another theme of the same author, and if like i suspect, there is the same theme customization tool in Tempera, you must be carefull with that theme settings.

    In BP settings, you have an option to show/hide the toolbar to logged out user. Deactivate it.

    And read the theme doc attentively ! 😉

    #230302
    Profile photo of Emineminero
    Emineminero
    Participant

    Hi, i’m on wordpress 4.0.1 and buddypress 2.1.1 and i’m having this issue, when i configure the pages “Registration” and “activate” none of them work, they are always empty. Searching in google i found out that i’m not the first one experiencing this issue, but i didn’t find a solution so here i am, any ideas what can i do?
    List of plugins:
    add actions and filters
    ajax event calendar
    akismet
    plugin update
    antispam bee
    ap gravatars
    autoblog
    average head footer code
    bbpress
    bbpress search widget
    bienvenido nuevo partner
    bienvenido nuevo usuario
    buddypress
    buddypress group email subscription
    chimpy lite mailchimp wordpress plugin
    contact form 7
    contact form 7 autoresponder addon plugin
    contact form db
    custom author link
    custom login
    cw image optimizer
    default featured image
    easy modal
    edit author slug
    email before download
    email login
    export user data
    featured image in rss feed
    featured images in rss w size and position
    feedburner email subscription
    fix rss feeds
    global hide toolbar
    global hide toolbar bruteforce
    google analytics by yoast
    hello dolly
    hungryfeed
    invite anyone
    mailchimp
    menu exporter
    multisite bulk user management
    multisite user management
    network username
    nice login widget
    p3 plugin performance profiler
    php code widget
    really simple captcha
    redirection
    revive old post former tweet old post
    share buttons by addtoany
    shortcodes ultimate
    simple login log
    social login
    spider catalog
    swiftype search
    syntaxhighlighter evolved
    unconfirmed
    under cons uction
    user activation keys
    user meta shortcodes
    videojs pro
    widget importer exporter
    widgetize pages light
    wiki
    wordfence security
    wordpress download monitor
    importador de wordpress
    wordpress move comments
    wordpress seo
    wp biographia
    wp custom admin bar
    wp facebook open graph protocol
    wp no category base wpml compatible
    wp nofollow post
    wp smtp
    wptouch mobile plugin

    Profile photo of mcpeanut
    mcpeanut
    Participant

    @izzyian, I believe if you use the code above it will also remove the Whats new form from your main activity stream too! If you want to hide it from just the profile pages i suggest trying this code.

    div#item-body form#whats-new-form {
    display: none;
    }

    Hope this helps

    #215432
    Profile photo of mahdiar
    mahdiar
    Participant

    Thanks .
    I read those pages before . The first one is about 9 month ago and it is closed to new replies . I can’t find any solution there .
    The second one is about how to hide comments completely in activity stream but it’s nice to see them just by one click on the activities .

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