Hey everybody! Is there a function to have different logo and header settings on the homepage and on all other pages?
Would be great! Thanks a lot in advance!
Hey WebbR,
Thank you for the inquiry.
You can assign a different logo for specific pages using a filter but you cannot apply a different header settings for different pages. However, you can control the visibility of the header for each page in the Layout > Header visibility and transparency settings.
To assign a logo for specific pages, please use the following filter in the functions.php file. Make sure to adjust the path of the logo image and configure the conditions according to your requirements.
function av_change_logo_img($img)
{
if( is_front_page() ){
$img = "logo.png";
}
return $img;
}
add_filter('avf_logo','av_change_logo_img');
Best regards,
Ismael
@Ismael
Perfect! Thank you!
Have a nice day!°
Hi,
Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic, or if we can close it.
Best regards,
Rikard
@Rikard
Everything is working fine! Thank you! Can be closed!
Hi WebbR,
Thanks as well for using Enfold and have a great day!
Best regards,
Nikko