This topic has 1 reply, 2 voices, and was last updated 7 years by Laura.

  • Author
  • #157899
     wilfriedMarseille
    Participant

    I 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 URL

    I 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 ..

    If you love Ableton check my blog :
    www.zikrea.com

    #158028
     Laura
    Moderator

    Hello, 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

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?