Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: wp and bp profile syncing–works only sporadically


Mike Pratt
Participant

@mikepratt

@djpaul don’t worry, I don’t think he’ll do it :-)

@bowe Here is an example of what’s in 1.2 right now (@Andy – is this what you were talking about?)

from single.php

<div class=”author-box”>

<?php echo get_avatar( get_the_author_email(), ’50’ ); ?>

<p><?php printf( __( ‘by %s’, ‘buddypress’ ), bp_core_get_userlink( $post->post_author ) ) ?></p>

</div>

So in the same code block we get the WP based avatar while getting the BP based Name. Hmm. Not sure why but I am going to use either bp_loggedin_user_avatar() or bp_member_avatar() instead, or possibly bp_core_fetch_avatar() feeding in the id via bp_core_fetch_avatar($post->post_author) but I am just flying by the seat of my pants and have not tried it yet.

I do know this. We know who the post author is. We know he has a username. That username is the same in WP or BP, so we can get his BP avatar and other info via that route. The rest is theming.

Skip to toolbar