Adding avatar next to top "login here"

Hi all,

I want to mimic Facebook and add the avatar for logged-in users to appear to the right of their name in “Welcome back, USER!” at the top of Blogs MU. Including the avatar would also resemble the sidebar login widget. I suspect it has to do with these lines in header.php but I’m not sure what to add.

<?php } else { ?>
<?php _e("Already a member?",TEMPLATE_DOMAIN); ?> <a href="<?php echo get_settings('home'); ?>/<?php echo get_members_login_slug(); ?>/"><?php _e("Login here",TEMPLATE_DOMAIN); ?></a>
<?php } ?>

Thanks for any help or suggestions! Love this theme.

  • Mason
    • DEV MAN’s Sidekick

    Hiya Pallasia,

    You’re in the right file. Look at line 160 and change it to this:

    <div class="user-tab"><?php _e('Welcome back', TEMPLATE_DOMAIN); ?>, <?php bp_loggedinuser_link() ?><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ) ?></div>

    This will pull in the small thumbnail image of the user. You’ll then need to add/edit the css to style it and get the spacing correct.

    And we’d always recommend using a child theme with your own header.php file so that you can update the theme down the road.

    Hope this helps. Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.