Hi, I can see this has been asked several times and using the supplied code:
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
if(is_page(9) )
{
$logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
}
return $logo;
}
I was able to make it work perfectly. My question is – what if I have another page that needs either the same ‘different’ logo or another logo completely? If I paste this same code snippet again and change the page ID it breaks my site. What am I doing wrong?
Thanks,
Slade
Hey Slade,
If you have more logos you would like to add, you can add more “if” statements like:
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
if(is_page(626) )
{
$logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
}
if(is_page(632) )
{
$logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo2.png";
}
return $logo;
}
Or if you want to use the same logo on more pages, you can add more pages using an array like this:
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
if(is_page( array(626, 632) ) )
{
$logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
}
return $logo;
}
Best regards,
Mike
Hi Mike, so sorry for the super late reply. This worked like a charm!! Thank you!!!
Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)
Best regards,
Vinay