Hi there,
Under Enfold > Social Profiles > Special: Email Icon – is it possible to have the email open in a new tab? On some devices, it opens up the actual mail application and on some, it opens the online version of Gmail or Yahoo.
Please advise.
Thanks!
Hi vantagepointmg,
In the Special Icon URL, try putting mailto:
mailto: (Email address hidden if logged out)
Hope this helps.
Best regards,
Nikko
Hello Nikko,
I appreciate the reply, however, that’s how we added it to the site and the issue is still happening. Do you have any additional thoughts?
Hi vantagepointmg,
Can you give us a link to the site? so we can have a closer look.
Best regards,
Nikko
Hi there,
Please see the link in the Private Content.
Thanks!
Hi vantagepointmg,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
Victoria
Hi there,
Please see the login in the “Private Content”. Thanks!
Hi vantagepointmg,
I have added this code at the bottom of functions.php:
function mail_in_newtab(){
?>
<script>
(function() {
var links = document.querySelectorAll('a[href^=mailto]');
links.forEach(function(link) {
link.target = "_blank";
});
})();
</script>
<?php
}
add_action('wp_footer', 'mail_in_newtab');
This code add target=”_blank” attribute to all links that will use mail.
Please review your site and let us know your feedback.
Also, this change I made will be removed during the theme update (overwritten), so I would suggest to use a child theme, which you can download from and find instructions on how to use: https://kriesi.at/documentation/enfold/child-theme/
Then remove the code from the parent theme’s functions.php and add it on the child theme’s functions.php file.
Best regards,
Nikko