Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Trying to create a sidebar with member_header.php info in a sidebar widget (4 posts)

Started 7 months, 1 week ago by: sesaconsulting

  • Profile picture of sesaconsulting sesaconsulting said 7 months, 1 week ago:

    Hey folks:

    Using WP 3.2.1
    Using BP 3.2.1

    I have created a sidebar widget calld “Your Profile” which has the code from member_header.php. All of the elements show fine in the sidebar when you are in buddypress pages, but I have noticed two glitches:

    1. on other static pages on the site, outside of buddypress pages, the user info is not showing properly. The users avatar does not show up, and all of the Activity, profile, friends, and group links are broken.

    2. When you are in a buddypress page, like say activity, and I click on another users avatar, the info in the sidebar widget then populates with that person’s info.

    Is there anyway around these bugs?

    This is the code in question:

    *****************

    <?php do_action( 'bp_before_member_home_content' ) ?>
    
    		<div id="item-header">
    			<?php locate_template( array( 'members/single/member-header.php' ), true ) ?>
    		</div><!-- #item-header -->
    
    		<div id="item-nav">
    			<div class="item-list-tabs no-ajax" id="object-nav">
    				<ul>
    					<?php bp_get_displayed_user_nav() ?>
    
    					<?php do_action( 'bp_members_directory_member_types' ) ?>
    				</ul>
    			</div>
    		</div><!-- #item-nav -->

    hd

    EDIT – HD, please always wrap code posted here in backticks, the symbol you see between the parentheses (`) – mercime

  • Profile picture of sesaconsulting sesaconsulting said 7 months ago:

    Still waiting on a response. can someone please give me some assistance with this?

    hd

  • Profile picture of kkradel kkradel said 7 months ago:

    “2. When you are in a buddypress page, like say activity, and I click on another users avatar, the info in the sidebar widget then populates with that person’s info.”

    If you click on an @username or on a person’s avatar, it usually takes you to that person’s activity stream. The member-header would normally be at the top of the page, so instead, since you put the member-header code in the sidebar, then that’s where it appears. The @username‘s avatar and information is called in that member-header code.

  • Profile picture of sesaconsulting sesaconsulting said 7 months ago:

    Thanks, kkradel. That makes perfect sense.