Skip to:

Avatar sizes in member theme

  • I’m creating a custom member theme and trying to figure out how to change the avatar size on the options bar (without changing all over avatar thumbnails).

    The avatar is called in optionsbar.php here :

    <?php if ( bp_has_options_avatar() ) : ?>
    <div class="avatar">
    <?php bp_get_options_avatar() ?>
    <?php endif; ?>

    I figured I would be able to do something like <?php bp_get_options_avatar($user_id, 1, $width, $height)?> or something but no joy.

    Any pointers?

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

  • fishbowl81



    * bp_get_options_avatar()



    * Gets the avatar for the current sub nav (eg friends avatar or group avatar).

    * Does not check if there is one – so always use if ( bp_has_options_avatar() )


    * @package BuddyPress Core

    * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()


    What you want is:

    <?= bp_core_get_avatar( $user->user_id, 2, 75, 75 ) ?>

    Brilliant, cheers, much appreciated.. Been hunting through files all day for so many different things it’s all become a bit of a blur..

    Easy enough to find out how to get logged in user avatar and change the size but hadn’t figured the $user->userid bit for that one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Avatar sizes in member theme’ is closed to new replies.
Skip to toolbar