Ultimate Member Social Profiles in Post Author
Quote from N3k0 on November 7, 2018, 5:00 pmHi everyone.
If you are using the Ultimate Member Plugin and you want to add the social links in the author box in the forum, only have to add the follow code in you theme functions.php
// UM Social Profile add_action('asgarosforum_after_post_author', 'custom_links', 30, 2); function custom_links($user_id, $post_counter) { echo '<div class="um-profile-connect um-member-connect">'; if ($display_profile_facebook = um_user('facebook')) { echo '<a href="' . $display_profile_facebook . '" style="margin:1px !important;background: #3B5999;color:#FFF !important;" target="_blank" class="um-tip-n" original-title="Facebook"><i class="um-faicon-facebook"></i></a>'; } else { } if ($display_profile_twitter = um_user('twitter')) { echo '<a href="https://www.twitter.com/' . $display_profile_twitter . '" style="margin:1px !important;background: #4099FF;color:#FFF !important;" target="_blank" class="um-tip-n" original-title="Twitter"><i class="um-faicon-twitter"></i></a>'; } else { } if ($display_profile_googleplus = um_user('googleplus')) { echo '<a href="' . $display_profile_googleplus . '" style="margin:1px !important;background: #dd4b39;color:#FFF !important;" target="_blank" class="um-tip-n" title="Google+"><i class="um-faicon-google-plus"></i></a>'; } else { } if ($display_profile_linkedin = um_user('linkedin')) { echo '<a href="' . $display_profile_linkedin . '" style="margin:1px !important;background: #0976b4;color:#FFF !important;" target="_blank" class="um-tip-n" title="LinkedIn"><i class="um-faicon-linkedin"></i></a>'; } else { } if ($display_profile_instagram = um_user('instagram')) { echo '<a href="' . $display_profile_instagram . '" style="margin:1px !important;background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);color:#FFF !important;" target="_blank" class="um-tip-n" original-title="Instagram"><i class="um-faicon-instagram"></i></a>'; } else { } if ($display_profile_youtube = um_user('youtube')) { echo '<a href="' . $display_profile_youtube . '" style="margin:1px !important;background: #e52d27;color:#FFF !important;" target="_blank" class="um-tip-n" title="YouTube"><i class="um-faicon-youtube"></i></a>'; } else { } echo '<br></div>'; }With this you add the default social forms from UM: Facebook, Twitter, Google+, Instagram, youtube and linkdeIn. The style is the same from the UM, so you can see the results in the attach image 🙂
Playing with this, you can add more custom forms from you UM configuration, only have to see the meta data to set in um_user(‘youmetahere’)
Cheers!
Hi everyone.
If you are using the Ultimate Member Plugin and you want to add the social links in the author box in the forum, only have to add the follow code in you theme functions.php
// UM Social Profile add_action('asgarosforum_after_post_author', 'custom_links', 30, 2); function custom_links($user_id, $post_counter) { echo '<div class="um-profile-connect um-member-connect">'; if ($display_profile_facebook = um_user('facebook')) { echo '<a href="' . $display_profile_facebook . '" style="margin:1px !important;background: #3B5999;color:#FFF !important;" target="_blank" class="um-tip-n" original-title="Facebook"><i class="um-faicon-facebook"></i></a>'; } else { } if ($display_profile_twitter = um_user('twitter')) { echo '<a href="https://www.twitter.com/' . $display_profile_twitter . '" style="margin:1px !important;background: #4099FF;color:#FFF !important;" target="_blank" class="um-tip-n" original-title="Twitter"><i class="um-faicon-twitter"></i></a>'; } else { } if ($display_profile_googleplus = um_user('googleplus')) { echo '<a href="' . $display_profile_googleplus . '" style="margin:1px !important;background: #dd4b39;color:#FFF !important;" target="_blank" class="um-tip-n" title="Google+"><i class="um-faicon-google-plus"></i></a>'; } else { } if ($display_profile_linkedin = um_user('linkedin')) { echo '<a href="' . $display_profile_linkedin . '" style="margin:1px !important;background: #0976b4;color:#FFF !important;" target="_blank" class="um-tip-n" title="LinkedIn"><i class="um-faicon-linkedin"></i></a>'; } else { } if ($display_profile_instagram = um_user('instagram')) { echo '<a href="' . $display_profile_instagram . '" style="margin:1px !important;background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);color:#FFF !important;" target="_blank" class="um-tip-n" original-title="Instagram"><i class="um-faicon-instagram"></i></a>'; } else { } if ($display_profile_youtube = um_user('youtube')) { echo '<a href="' . $display_profile_youtube . '" style="margin:1px !important;background: #e52d27;color:#FFF !important;" target="_blank" class="um-tip-n" title="YouTube"><i class="um-faicon-youtube"></i></a>'; } else { } echo '<br></div>'; }
With this you add the default social forms from UM: Facebook, Twitter, Google+, Instagram, youtube and linkdeIn. The style is the same from the UM, so you can see the results in the attach image 🙂
Playing with this, you can add more custom forms from you UM configuration, only have to see the meta data to set in um_user(‘youmetahere’)
Cheers!
Uploaded files: