I agree, can you add option to create a field with a custom link not relating to the search?
like on the wp profile but on the bp edit profile fields selection.
@yoshimitsu1234 @dromy,
1) create your social fields on xprofile
2) give them a name like Twitter or Facebook
3) tell the user to enter their social username
4) install font-awesome or similar to get nice social icons
This function works as of BP 1.7 and was tested on BP 2.0.1. Add it to bp-custom.php or your (child) theme’s functions.php
Icons are showed under @username | active since at the right of the user avatar on the profile header.
Remove the text Test… if you want to use only font-awesome icons or replace it with an image or text of your choice
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>Test Twitter</a>
<?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>Test FB</a>
<?php
endif;
}
add_filter( 'bp_before_member_header_meta', 'bpfr_socialize_profile' );