Same way you’d do it on a single site. If you just want to show the avatar… just get_avatar.
Thread Starter
Nahum
(@nahummadrid)
I’m sorry I should’ve explained further what I’m trying to do.
<?php
global $bp;
$username = bp_get_member_name();
?>
<?php if ( bp_has_members('include='.$post->post_author) && username_exists( $username ) ) : ?>
<?php bp_member_avatar('type=full');?>
<?php else:?>
mystery_man will show
This user has no posts
<?php endif;?>
I was trying to show a users bp avatar on different subdomains’ author.php template. In sense force /author/bpusername even if the member didn’t have any posts on the site.
The hurdle for me was that when a bp member didn’t exist on the site, something funky would happen in the place of the avatar, it would show a bunch of members avatars. Everything works fine for users that do have posts and exist on the site so the author.php looks like the site’s author but i can also show BP info and links.
Thread Starter
Nahum
(@nahummadrid)
Ok the solution was so simple. I’m embarrassed.
I realized that I had the bp stuff in the wrong place
I just moved if have posts above all the BP stuff.
<?php if (have_posts()) ?>
<?php if ( bp_has_members('include='.$post->post_author) )?>
Thanks andrea for your replying. I shoud’ve known it would be so easy it was hard.