Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1345778

    Hi there,

    I was using some instructions on how to allow a different logo on the homepage, as detailed on your website: https://kriesi.at/documentation/enfold/logo/

    However it asked me to edit the funtions.php. After doing this, the amendment didn’t occur and it also broke the website, showing this message – ‘There has been a critical error on this website.’. After taking the code I had entered out it still didn’t restore. I now can’t access the site at all. Are you able to assist? I have put the login details in private.

    The theme was purchased under myself and so replies should come to (Email address hidden if logged out) or (Email address hidden if logged out) .
    If I need to access something sent to the client’s hosting please let me know as it goes to his email address.

    __________

    Hi again, just jumped back in to say that I have restored a backup from hosting and so this can be closed. I will open another one asking how to make the logo on the homepage different. Ta!

    __________

    Cheers, Kristin

    • This topic was modified 2 years, 9 months ago by pinnicreative. Reason: I resolved the issue
    #1345864

    Hey Kristin,

    Thank you for the inquiry.

    You can use this filter in the functions.php file to assign a different logo on the home page.

    add_filter('avf_logo','avf_change_logo_img');
    
    function avf_change_logo_img($img)
    {
        if( is_front_page() )
        {
            $img = "logo-home.png";
        }
        return $img; 
    }
    

    Make sure to replace the image URL or the value of the $img variable with the actual image URL that you would like to display in the home page. You need to adjust this line.

     $img = "logo-home.png";
    

    Best regards,
    Ismael

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