Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1194126
    #1194633

    there is another filter that can do the job:

    add_filter('avf_header_setting_filter','replace_transparent_logo_on_some_pages');
    function replace_transparent_logo_on_some_pages($header){
        if( is_page(123) ){
            $header['header_replacement_logo'] = "https://url-to-the-new-logo";
        }
        return $header; 
    }

    you can use any conditional tag wordpress offers – maybe you can use even if (lang == 'en') {
    you can use arrays : if( is_page( array( 42, 54, 6 ) ) ) { etc. pp

    the logo itself is possible with this as you said allready:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo){
        if( is_page(21) ) {
        	$logo = "http://www.domain.com/wp-content/uploads/logoforpage21.jpg"; 
        }
        elseif ( is_page( array( 42, 54, 6 ) ) ) {
        	$logo = "http://www.domain.com/wp-content/uploads/logoforpage42.jpg"; 
        }
        elseif ( is_page() && !is_page(1307) )  {
        	$logo = "http://www.domain.com/wp-content/uploads/logoforpage23.jpg";  
        }
        return $logo;
    }
    #1194752

    Hi,
    This is not what I am after.
    I am aware of the is_page() function, but I wanted to know if there is somekind of function, like:

    if ( is_transparent_header() ) :
    return $logo;
    endif;

    Greetings

    #1194798

    But this is only relevant if you allow transparency for narrow screen widths.
    This would certainly have been an important information in your introduction.

    On helper-main-menu.php since line 127 ( Enfold 4.7.3)
    there is a condition that is bound to header_transparency

    on functions-enfold.php since line 1166 :
    //header class that tells us to use the alternate logo
    the class : av_alternate_logo_active is set for that to #header

    on layout.css there is ruled the visibility of that logo:

    @media only screen and (max-width: 989px) {
    	.responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > img{opacity:1}
    	.responsive.html_mobile_menu_tablet #top .av_header_transparency .logo img.alternate{display:none;}
    }
    @media only screen and (max-width: 767px) {
    	.responsive #top .av_header_transparency.av_alternate_logo_active .logo a > img{opacity:1}
    	.responsive #top .av_header_transparency .logo img.alternate{display:none;}
    }
    #1194801

    Hi, I don’t see why this is only relevant for narrow transparent screen widths.
    Anyway thanks, I’ll see if I can use the class mentioned.

    #1194802

    the logo if set is alway present : rule it via media querries as in layout.css
    ________

    Hi, I don’t see why this is only relevant for narrow transparent screen widths.

    if you are below 768px (or 990px) you will generally not see the alternative logo. So why switch. For this case it would be sufficient to set only the normal logos.
    So it is only relevant if you keep the transparency contrary to the default settings of Enfold.
    In this case, it would be necessary to set a different alternative logo and then make the layout adjustments.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.