So I'm not a developer, so I'm only guessing here, but I tried updating the script to look like this to include the "_blank", but it's not working for me. :
<!-- Redirect Main Logo to External URL --> <script type='text/javascript'> jQuery( document ).ready(function() { jQuery('a#logo').attr('href','https://website.com', "_blank"); }); </script>
Can you show me the correct way to update the script provided by Tahir (below) so that it opens in the new tab? Thanks in advance.
Hi, I'm trying to point the URL of the logo to an external site. I uploaded this plugin:
https://wordpress.org/plugins/smntcs-custom-logo-link
But it doesn't seem to be working. I'm guessing the theme is overriding the plugin settings.
Do you know of an easy way thought a snippet or plugin to allow this functionality?
Thanks in advance!
Hi Ben,
The logo will always link to the home page by default – if you wish to change that to be a custom link you’ll need to edit this section:
in the header.php file:
Thanks.
Hey Again,
Please have a look at this Article :Change logo url link via JS code Globally.
Thanks
ThemeNectar Support Team
Thanks Tahir! That works. Do you know if there's an easy way to make it open in a new tab?
Hi Ben,
Check this out:https://www.geeksforgeeks.org/how-to-open-url-in-new-tab-using-javascript/
Thanks.
So I'm not a developer, so I'm only guessing here, but I tried updating the script to look like this to include the "_blank", but it's not working for me. :
<!-- Redirect Main Logo to External URL -->
<script type='text/javascript'>
jQuery( document ).ready(function() {
jQuery('a#logo').attr('href','https://website.com', "_blank");
});
</script>
Can you show me the correct way to update the script provided by Tahir (below) so that it opens in the new tab? Thanks in advance.
Hey Again,
Use this revised Custom Code.
Thanks
ThemeNectar Support Team
Thank you so much!