Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing the avatar size on the Members page

  • Avatar of Tudmak
    Tudmak
    Participant

    @tudmak

    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)
  • Avatar of aces
    aces
    Participant

    @aces

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

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

    Avatar of Tudmak
    Tudmak
    Participant

    @tudmak

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

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

    @tudmak

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

    Avatar of Tudmak
    Tudmak
    Participant

    @tudmak

    @henrywright-1

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

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

    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.

    Avatar of Tudmak
    Tudmak
    Participant

    @tudmak

    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; ?>
    
    Avatar of Henry
    Henry
    Participant

    @henrywright-1

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

    Avatar of Tudmak
    Tudmak
    Participant

    @tudmak

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

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

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

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

    Avatar of joanicegreen
    joanicegreen
    Participant

    @joanicegreen

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

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

    Avatar of Tudmak
    Tudmak
    Participant

    @tudmak

    Thanks! Helps a lot

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.