Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1253256

    I used the following function, which I found here.

    It is not working. I would appreciate some input, and that is why I opened this new thread and PAID for support renewal. Thank you.

    //change logo only in Homepage
    add_filter('avf_logo','av_change_logo_img');
    
    function av_change_logo_img($img)
    {
        if( is_page(202))
        {
            $img = "path to logo";
        }
        
        return $img; 
    }
    #1253333

    SO much for hearing back from anyone.

    I think I figured it out using CSS versus the function that you had provided on your website. I would have liked to use the function…

    This is what I did if anyone out there needs this:

    .home .av_header_transparency.av_alternate_logo_active .logo {
    content:url(home-page.logo) !important;
      
    }
    #1253473

    Hi Arlie_Francis,

    Thanks for providing that CSS code, it should surely help many enfold users.
    I just want to add that this code only works on homepage with transparent headers.

    As for PHP code that didn’t work, it’s because of the transparent header which uses this hook: avf_logo_subtext
    It should work using this code:

    add_filter('avf_logo_subtext', 'kriesi_logo_addition');
    function kriesi_logo_addition($sub) {
      if( is_front_page() ) {
        $sub = '<img src="https://website.com/wp-content/uploads/2020/10/alternate-logo.jpg" class="alternate" alt="" title="alternate logo">';
      }
      return $sub;
    }

    Just replace http://website.com/wp-content/uploads/2020/10/alternate-logo.jpg with the correct image url.

    Best regards,
    Nikko

    • This reply was modified 4 years, 2 months ago by Nikko.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.