Hi, I have a site that has one page that looks and feels different from the rest of my site. On this page, we have successfully changed the logo image with CSS, but the client would like the logo to also LINK to a different site than the rest of the site. I found this topic on adding a function: http://kriesi.at/documentation/enfold/change-the-logo-url-on-some-pages/ with this snippet but is there a way to also state where the logo should link to? Thanks!
add_filter(‘avf_logo’,’av_change_logo_url’);
function av_change_logo_url($url)
{
if( is_front_page() )
{
$url = “http://link.to/img.png”;
}
if( is_page(‘contact’) )
{
$url = “http://link.to/img2.png”;
}
return $url;
}
Hey janetgot,
Please add following code to Functions.php file in Appearance > Editor
add_filter('avf_logo_link','av_change_logo_link');
function av_change_logo_link($link)
{
if( is_page('contact') )
{
$link = "http://kriesi.at";
}
return $link;
}
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
if( is_page('contact') )
{
$logo = "http://link.to/img2.png";
}
return $logo;
}
Best regards,
Yigit
Perfect! Thank you!
Hi,
You are welcome! :)
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)
Best regards,
Yigit