Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Show full picture instead of thumbnail


peterverkooijen
Participant

@peterverkooijen

I can’t pass the member ID. It’s for the featured members loop on the directory page, something like this:

?php while ( bp_site_members() ) : bp_the_site_member(); ?>

<a href="<?php bp_the_site_member_link() ?>"><?php bp_the_site_member_avatar() ?></a>
<h3><a href="<?php bp_the_site_member_link() ?>"><?php bp_the_site_member_name() ?></a></h3>

<?php do_action( 'bp_core_directory_members_content' ) ?>

<?php endwhile; ?>

The function is in bp-core-templatetags.php:

function bp_the_site_member_avatar() {
echo apply_filters( 'bp_the_site_member_avatar', bp_get_the_site_member_avatar() );
}
function bp_get_the_site_member_avatar() {
global $site_members_template;

return apply_filters( 'bp_get_the_site_member_avatar', $site_members_template->member->avatar_thumb );
}

Would it be possible to write a variation on this function to get the big version? Replace ‘avatar_thumb’ with ‘avatar’?

Trying that now…

YES, replacing ‘avatar_thumb’ with ‘avatar’ does produce the bigger versions. So here’s an alternative function that works, put in bp-custom.php:

function bp_the_site_member_photo() {
echo apply_filters( 'bp_the_site_member_photo', bp_get_the_site_member_photo() );
}
function bp_get_the_site_member_photo() {
global $site_members_template;

return apply_filters( 'bp_get_the_site_member_photo', $site_members_template->member->avatar );
}

Or is there already a similar function somewhere in BP?

Skip to toolbar