Hey Team,
is it possible to link the logo in the menu bar to another side in a new tab?
Kind regards,
Bewohnerfrei
Hey Bewohnerfrei,
Sorry, I’m not really sure what you are asking, do you want the logo link to open a new tab?
Best regards,
Mike
Hey Mike,
I would like to open an external page in a new tab by clicking on the logo.
Best regards,
Bewohnerfrei
Hi,
Try adding this code to the end of your functions.php file in Appearance > Editor:
add_filter('avf_logo_link','av_change_logo_link');
function av_change_logo_link($link)
{
$link = '"http://kriesi.at" target="_blank"' ;
return $link;
}
Please adjust the link to suit.
Best regards,
Mike
Hey Mike,
this code doesn’t work for me.
Best regards
Hi,
Sorry, please change the code to this:
add_filter('avf_logo_link','av_change_logo_link');
function av_change_logo_link($link)
{
$link = 'http://kriesi.at' ;
return $link;
}
function av_logo_link_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('.logo a').attr('target','_blank')
});
</script>
<?php
}
add_action('wp_footer', 'av_logo_link_target');
Best regards,
Mike
This code works perfectly, thanks Mike!
Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.
For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)
Best regards,
Mike