-
Author
-
April 7, 2017 at 15:39 #157899
wilfriedMarseille
ParticipantI try to make this tutorial : http://sharmstr.com/displaying-social-links-in-members-profile/
I make my group filed with 4 text field FaceBook, Twitter, SoundCloud and Youtube
And on my profile i make juste the Facebook URLI took your code from the tutorial than i paste in kleochild/function.php
And nothing …
So i change just the line ` if ($link == ‘facebook’) {
$iconlink = ‘gplus’;`
To put a Google Email on my Facebook Field ( to check if is working )
And always nothing ….“add_action(‘bp_profile_header_meta’,’social_links_in_header’);
This is my function.php code
function social_links_in_header () {
$social_links = array(‘facebook’,’twitter’,’google+’,’instagram’,’linkedin’,’youtube’,’pinterest’);
foreach( $social_links as $link ) {
if ( $data = bp_get_profile_field_data( array(‘user_id’=>bp_displayed_user_id(), ‘field’=>$link )) ) : ?>
<?php
if ($link == ‘facebook’) {
$iconlink = ‘gplus’;
} elseif ($link == ‘pinterest’) {
$iconlink = ‘pinterest-circled’;
} elseif ($link == ‘instagram’) {
$iconlink = ‘instagramm’;
} else {
$iconlink = $link;
}
?>
<a href=”<?php echo bp_get_profile_field_data( array(‘user_id’=>bp_displayed_user_id(), ‘field’=>$link)); ?>” target=”_blank”><i class=”icon-<?php echo $iconlink; ?>”></i></a>
<?php endif;
}
}
If i understand with that code, for my textfield facebook/twitter/Youtube and if i add ‘google+’,’instagram’,’linkedin’
When user put URL.
When user check his profil he see social icon and no URL text. ?If is that is not working withme ..
April 10, 2017 at 08:17 #158028Laura
ModeratorHello, please check the following answer here https://buddypress.org/support/topic/social-media-link-icons-in-profiles/ just follow the steps and let me know if it works 🙂
You can skip the font-awesome step as the theme already has icons.
If you need help i will be happy to help you 🙂Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.