i have fixed this issue using custome code.
Link: https://goedmedicine.com/author/florencio-lee/
Code:
// Add Custom Social media icon (Instagram, Facebook, Twitter, and Email)
function woodmart_author_social_media_links() {
$author_id = get_the_author_meta('ID');
// Social media keys with corresponding Font Awesome icons
$social_media_keys = array(
'twitter' => 'fab fa-twitter',
'facebook' => 'fab fa-facebook-f',
'instagram' => 'fab fa-instagram',
'gmail' => 'fas fa-envelope', // Use a general email icon for Gmail
// Add more social media keys as needed
);
echo '<div class="author-social-media">';
foreach ($social_media_keys as $social_media_key => $icon_class) {
$social_media_url = '';
if ($social_media_key === 'gmail') {
// Get the current user's email
$current_user_email = get_the_author_meta('user_email', $author_id);
$social_media_url = 'mailto:' . esc_attr($current_user_email);
} elseif (in_array($social_media_key, array('facebook', 'twitter'))) {
// For Facebook and Twitter, assume the user profile fields have the corresponding URLs
$social_media_url = get_the_author_meta($social_media_key, $author_id);
} elseif ($social_media_key === 'instagram') {
// For Instagram, assume the user profile field has the corresponding URL
$social_media_url = get_the_author_meta('instagram_url', $author_id);
}
if (!empty($social_media_url)) {
echo '<a href="' . esc_url($social_media_url) . '" target="_blank" rel="nofollow">';
echo '<i class="' . esc_attr($icon_class) . '" aria-hidden="true"></i>';
echo '</a>';
}
}
echo '</div>';
}
// Add the social media links to the author bio
add_action('woodmart_author_social_media', 'woodmart_author_social_media_links');
Close ticket