Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing the avatar size on the Members page

  • @tudmak

    Participant

    I’ve seen many threads about changing the avatar size, but I just can’t seem to get it to work. I’m using the default Buddypress theme, and I’m trying to change the size of the avatars on the Members page (i-e: the page with the list of all members) from the default of 30px x 30px.

    I’ve tried changing bp_member_avatar() to bp_member_avatar(‘type=full&width=75&height=75′) in /bp-themes/bp-default/members/members-loop.php as well as in /bp-core/bp-core-widgets.php, but it hasn’t worked. For the first, the page couldn’t load after the header, and for the second, it gave me an error saying that the ‘=’ was unexpected (I then changed the single quote to a double quote, and the error stopped appearing, but it didn’t change the avatar size).

    Any ideas? Thanks in advance!

Viewing 12 replies - 1 through 12 (of 12 total)
  • @aces

    Participant

    @henrywright-1

    Member

    bp-core-widgets.php is a core file, you should try to avoid editing core files if possible.

    Open members/member-loop.php and change the bp_member_avatar function to

    <?php bp_member_avatar( 'type=thumb&height=30&width=30' ); ?>

    @tudmak

    Participant

    @henrywright-1 @aces Thanks for the answers, but none of those two work… Any other ideas?

    @henrywright-1

    Member

    @tudmak

    Humm.. can you post the exact code you’re removing from members-loop.php?

    @tudmak

    Participant

    @henrywright-1

    What do you mean? I’m not removing anything from members-loop.php…

    @henrywright-1

    Member

    You said my solution to remove the bp_member_avatar function in members-loop.php and replace it with <?php bp_member_avatar( 'type=thumb&height=30&width=30' ); ?> didn’t work?

    i wanted to know the exact code you are replacing in that file.

    @tudmak

    Participant

    Here’s a part of the code:

    	<?php do_action( 'bp_before_directory_members_list' ); ?>
    
    	<ul id="members-list" class="item-list" role="main">
    
    	<?php while ( bp_members() ) : bp_the_member(); ?>
    
    		<li>
    			<div class="item-avatar">
    				<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( 'type=full&width=750&height=750' ); ?></a>
    			</div>
    
    			<div class="item">
    				<div class="item-title">
    					<a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
    
    					<?php if ( bp_get_member_latest_update() ) : ?>
    
    						<span class="update"> <?php bp_member_latest_update(); ?></span>
    
    					<?php endif; ?>
    

    @henrywright-1

    Member

    Ah OK.

    Remove this bit

    <?php bp_member_avatar( 'type=full&width=750&height=750' ); ?>

    and replace it with

    <?php bp_member_avatar( 'type=thumb&height=30&width=30' ); ?>

    @tudmak

    Participant

    Thanks for all the help, but it still doesn’t work when I do that…

    @henrywright-1

    Member

    if you want to make the avatar a bit bigger you could try

    <?php bp_member_avatar( 'type=thumb&height=100&width=100' ); ?>

    @joanicegreen

    Participant

    There is a really good article on how to do this with CSS:

    http://wpmu.org/how-to-create-a-custom-buddypress-members-directory/

    @tudmak

    Participant

    Thanks! Helps a lot

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Changing the avatar size on the Members page’ is closed to new replies.
Skip to toolbar