Hi, I recently asked how to amend the socket link in the new theme update.
You replied and all was fine but have just realised that the link now opens in the same Tab.
I want in to open in a new browser tab so this is what I inserted in Enfold – Footer – Copyright (see private content) including target=”_blank” but it is not working.
What do I need to do?
Thanks
Hey GOWD!
Please add following code to Functions.php file in Appearance > Editor
function add_custom_socket_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('#socket a').attr('target','_blank');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_socket_target');
Regards,
Yigit
Hi Yigit,
I added your code to the Functions.php file of my child theme and when I refreshed the page I got the White Screen of Death.
I FTP into the host, downloaded the file, removed the code, re-uploaded, site now working again.
Is there an error?
Hi!
Code seems fine. If you do not mind creating a temporary admin login we can add the code for you
Best regards,
Yigit
Hi Yigit, the target=”_blank” I initially added to Enfold – Footer – Copyright has suddenly started working so no need for the code now.
Thank you for your help.
You may close this thread.