Hi there, I have a blog, which has a different url from the main page. Is there a way to assign a custom link to logo? Thanks!
Hey Steve,
Please add following code to Functions.php file in Appearance > Editor and replace page ID (59 in example below)
add_filter('avf_logo_link','av_change_logo_link');
function av_change_logo_link($link)
{
if(is_page(59)){
$link = "http://kriesi.at";
}
return $link;
}
Best regards,
Yigit
Ačiū :)
Can this be in the child theme? Does functions.php get updated with the theme?
yes – and if you like to change the alt text for logo:
add_filter('avf_logo_alt', 'avf_change_logo_alt');
function avf_change_logo_alt($alt) {
$alt = "new alt text";
return $alt;
}
Hi Steve,
Have you tried the solution by @Guenni007?
Do you still need our help?
Best regards,
Victoria
Great help, thank you.
I used both solutions by Guenni007 and Yigit.
I needed to use the link sitewide, not on one page, so ended up using:
add_filter(‘avf_logo_link’,’av_change_logo_link’);
function av_change_logo_link($link){
$link = “http://my-link.com”;
return $link;
}
add_filter(‘avf_logo_alt’, ‘avf_change_logo_alt’);
function avf_change_logo_alt($alt) {
$alt = “my alt text”;
return $alt;
}