Social media icons in user/instructor profile

Home Forums Legacy Support Support queries How-to & Troubleshooting Social media icons in user/instructor profile

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #147241
    realhituni
    Participant
    Hi, I am trying to get the social media icons to appear on user/instructor profiles. I followed the instructions you posted here: https://wplms.io/support/knowledge-base/social-profile-field-group/, but I still get a list of social media links rather than the icons. See: https://prnt.sc/ihf31w Also, can I get the links to open in a new tab by default? Thanks.
    #147327
    H.K. Latiyan
    Participant
    Hi, You are seeing the profile page on the profile page you'll see the link, but as shown in the article also if you add the member on the page like using the page builder, there you can see the icons.
    #147632
    realhituni
    Participant
    Hi, Thanks for getting back me. I am not sure what you suggest I do. I want the social media icons to appear on user profiles, e.g. when you go to site.com/members/xyz, not when you embed the profile on other pages. Plus, how do I get them to open on a new tab by default? Thanks
    #147786
    H.K. Latiyan
    Participant
    Hi, If you can please share your site url and the admin credentials then I can show it on your website how to show the icons. PS: Please mark your reply as private while sharing the credentials.
    #148429
    realhituni
    Participant
    This reply has been marked as private.
    #148625
    H.K. Latiyan
    Participant
    This reply has been marked as private.
    #148873
    realhituni
    Participant
    This reply has been marked as private.
    #148997
    H.K. Latiyan
    Participant
    Hi, For this, try adding the below code in your wplms-customizer.php file present in your wplms customizer plugin: add_action('bp_after_member_header',function(){   $social_field_group = vibe_get_option('social_field_group');       $bp_xprofile_groups = $groups = bp_xprofile_get_groups( array( 'fetch_fields' => true ) );     $member_html .= '<ul class="socialicons">';     if(!empty($bp_xprofile_groups)){         foreach($bp_xprofile_groups as $g){             if($g->name == $social_field_group){                 if ( !empty( $g->fields ) ) {                     foreach ( $g->fields as $field ) {                         $id = $field->id;                         $url = strip_tags(bp_get_profile_field_data( array('user_id'=> $user->ID,'field'  => $field->name) ));                         if(!empty($url) && strlen($url)>2){                             $n = strtolower($field->name);                             if(strpos($url,'http://') === false){$url = 'http://'.$url;}                             $member_html .= '<li><a href="'.$url.'" class="'.$n.'"><i class="fa fa-'.$n.'"></i></a></li>';                         }                     }                 }             }         }     }     $member_html .= '</ul>';     echo $member_html; });
    #149366
    realhituni
    Participant
    Hi, thanks for this, but it didn't work I am afraid.
    #149443
    H.K. Latiyan
    Participant
    Hi, Sorry, I forgot to echo the variable at the last. I have updated the code in my previous reply and also added the code to your website. Now, it shows the icons on your website, refer: http://prntscr.com/ios2dr
    #149798
    realhituni
    Participant
    Amazing! Many thanks for your help. The only thing I added is a target="_blank" so that links open in a new tab.
    #149851
    Diana
    Participant
    @realhituni, Can we close this topic now?
    #150011
    realhituni
    Participant
    Yes, please do.
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Social media icons in user/instructor profile’ is closed to new replies.