Tagged: logo
-
AuthorPosts
-
February 23, 2026 at 1:37 pm #1495370
Dear Team,
on this page https://www.eth-solutions.de/ we would like to change the logo color top left depending on teh active menu item:The main logo (red) you see top left.
-> If a user clicks this page https://www.eth-solutions.de/garten-und-landschaftsbau/ and related subpages, there shall be a different logo.
Is there a way to realize this?
Thanks a lot and best regardsTilman
February 23, 2026 at 9:50 pm #1495386Hey Tilman,
If you want a different logo on some pages, try this function in your child theme functions.php and change the logo url to yours and change the page IDs to yours and add as many as you like with a comma between each: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; }If you want all pages except your home page to be different, then I would recommend changing your logo in the theme settings to your other logo and use this function to only change the home page to the red one:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if(is_page(2) ) { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }Best regards,
MikeFebruary 24, 2026 at 3:14 pm #1495428in your case i would create a is_tree conditional and then change the logo for all subpages by that conditional
function is_tree($pid) { global $post; if ( is_page() ) { if ( is_page($pid) ) { return true; } $ancestors = get_post_ancestors($post->ID); if ( in_array($pid, $ancestors) ) { return true; } } return false; } function av_change_logo($logo){ if (is_tree(265)) { $logo = "[logo url]";} elseif (is_tree(509)) { $logo = "[logo url]";} elseif (is_tree(530)) { $logo = "[logo url]";} return $logo; } add_filter('avf_logo','av_change_logo');your Landschaftbau is page ID: 265
by the way enfold has now a class on subpages for that on body tag: parent-pageid-265 – but this will only work for the next level of direct children.
then you can have that conditional:if ( is_page(265) || $post->post_parent == 265 ) { // ... }But: the is_tree seems to be more elegant.
February 24, 2026 at 4:12 pm #1495433Dear Mike & Guenni,
thx a lot for your infos. If this was not clear, sorry: I want to have a defined set of different page IDs which are triggering a different logo color. So we are not talking about the home page only:
-> page ID 1,2,3 -> logo red
-> page ID 4,5,6 -> logo greenIn addition:
-> would it be possible to change in a similar way the color of top navigation items as well – and if so, how?
Same logic with same page IDs as triggerthx again & best regards Tilman
February 24, 2026 at 4:14 pm #1495434Dear Mike & Guenni,
thx a lot for your infos. pls see specification below. Cheers, TilmanFebruary 24, 2026 at 4:34 pm #1495436yes – enter your red logo to the enfold logo input field.
on media library determine the path to your : ETH_galabau_Logo
guess it looks like this one :

insert that url to the is_tree(265) url:
place this snippet to your child-theme functions.php:function is_tree($pid) { global $post; if ( is_page() ) { if ( is_page($pid) ) { return true; } $ancestors = get_post_ancestors($post->ID); if ( in_array($pid, $ancestors) ) { return true; } } return false; } function av_change_logo($logo){ if (is_tree(265)) { $logo = "/wp-content/uploads/…/…/your_green_galabau_Logo.png";} return $logo; } add_filter('avf_logo','av_change_logo');the first function (function is_tree($pid) ) is for having all subpages to your galabau page (which has the id: 265.
from this moment – you do not need to add a new page-id to your page_array. If a page is a child of that 265 it will have that green logo. -
AuthorPosts
- You must be logged in to reply to this topic.
