Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #939910
    #939926

    Try this instead:

    add_filter('avf_header_setting_filter','avf_header_setting_filter_mod');
    function avf_header_setting_filter_mod($header)
    {
        if( is_home( )  ){
            $header['header_replacement_logo'] = "http://adamwolfpt.pcscloudsolutions.com/wp-content/uploads/adam-wolf-pt-logo-color-transparent.png";
        }
        return $header; 
    }

    by the way if you have a post as landing page it must be is_frontpage

    and the function name is free in use – sometimes a bit more meaningfull is better

    add_filter('avf_header_setting_filter','replace_transparent_logo_on_homepage_only');
    function replace_transparent_logo_on_homepage_only($header)
    {
        if( is_home( ) ){
            $header['header_replacement_logo'] = "http://adamwolfpt.pcscloudsolutions.com/wp-content/uploads/adam-wolf-pt-logo-color-transparent.png";
        }
        return $header; 
    }
    • This reply was modified 6 years, 8 months ago by Guenni007.
    #939929

    Thank you for chiming in. Unfortunately, that changes the transparent header on all pages.

    #939933

    take please your is_page(15) this works definitly

    or i dont know why:

    add_filter('avf_header_setting_filter','replace_transparent_logo_on_homepage_only');
    function replace_transparent_logo_on_homepage_only($header)
    {
        if( is_front_page( ) ){
            $header['header_replacement_logo'] = "http://adamwolfpt.pcscloudsolutions.com/wp-content/uploads/adam-wolf-pt-logo-color-transparent.png";
        }
        return $header; 
    }

    normaly is_home( ) should work if the front-page is a page ! you can see it in your source code that the startpage gets the home class ???

    #939934

    Good to go! Appreciate ya ‘007. ; )

    #939945

    by the way avf_header_setting_filter can be used to give one page a unique header style:

    Nice things f.e. for a portfolio page to have that design

    add_filter('avf_header_setting_filter','av_change_header_style');
    function av_change_header_style($header){
        if( is_front_page() ){
            $header['header_position'] = "header_right header_sidebar";
        }
        return $header; 
    }
    #940350

    Hi,

    Thanks for sharing and helping out @guenni007 :-)

    Best regards,
    Rikard

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