there is that big snippet which enables us to have for each page/post the opportunity to choose if we want the header on top or left/right.
if i like to have a unique logo on that pages which have header on sidebar i have the following code to functions.php of my child-theme:
function avia_custom_logo(){
?>
<script>
jQuery('.html_header_sidebar .logo').find('img').attr('src', 'path to the other logo');
</script>
<?php
}
add_action('wp_footer', 'avia_custom_logo');
on fast machines there was no intermediate state – but on older pcs and not so fast engines there is first the standard logo and then after a while the replaces logo.
Is there a way not to have that intermediate state?
ok allthough this works – i did it now in a different way:
this seems to be faster – and for the sidebar logos i have the array method)
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
if( is_page(21) ) {
$logo = "path to url1";
}
elseif ( is_page( array( 42, 54, 6 ) ) ) {
$logo = "path to url2";
}
elseif ( is_page() && !is_page(1307) ) {
$logo = "path to url3";
}
return $logo;
}
Hi,
That is a clever idea!
Thank you for sharing, @Guenni007 we would love to add some stuff at
https://github.com/KriesiMedia/enfold-library/
Best regards,
Basilis