Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Social Icons Profiles BP

@danbp

Participant

I double checked the snippet in twenty thirteen functions and also in bp-custom and it works !

– wp 4.0.1 – bp 2.1.1
– font awesome 4.0.1
– font awesome css files in /twentythirteen/css/
– font files in /twentythirteen/font/
– class names are .icon-twitter and .icon-facebook

function bpfr_socialize_profile () {	

echo '<br>'; // don't remove !

if ( $data = bp_get_profile_field_data( 'field=Twitter' ) ) : 
?>

<a href="http://twitter.com/<?php echo xprofile_get_field_data( 'Twitter', bp_displayed_user_id() );?>/" target="_blank" title="Twitter"><i class="icon-twitter"></i> Twitter</a>&nbsp;

<?php endif;

if ( $data = bp_get_profile_field_data( 'field=Facebook' ) ) : 
?>

<a href="http://facebook.com/<?php echo xprofile_get_field_data( 'Facebook', bp_displayed_user_id() );?>/" target="_blank" title="Facebook"><i class="icon-facebook"></i> Facebook</a>		

<?php		
endif;
}
add_filter( 'bp_before_member_header_meta', 'bpfr_socialize_profile' );
Skip to toolbar