Tagged: ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #331246
    #331254

    Hey wilsonhb!

    Please add following code to Functions.php file in Appearance > Editor

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if( is_single( ) )
        {
        $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
        }
        return $logo;
    }

    Cheers!
    Yigit

    #331301

    Thanks, Yigit. I did it but it gives this message:

    Fatal error: Cannot redeclare av_change_logo() (previously declared in /hermes/bosnaweb06a/b134/ipg.holagabo/wp-content/themes/enfold/functions.php:459) in /hermes/bosnaweb06a/b134/ipg.holagabo/wp-content/themes/enfold/functions.php on line 478

    I dont know what I did wrong. Any clue?

    Thanks

    #331319

    Plus the web is offline :(

    #331795

    Hi!

    Please go to wp-content/themes/enfold and undo the changes in functions.php file via FTP. Apparently you already have the function declared in Functions.php file.
    You can try changing function name

    add_filter('avf_logo','av_change_single_logo');
    function av_change_single_logo($logo)
    {
        if( is_single( ) )
        {
        $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
        }
        return $logo;
    }

    Cheers!
    Yigit

    #331866

    Hi again, I think I copied it twice. But later I erased both. I’m in FTP but cant find you suggested code. I have uploaded the original function.php file but the site still doesnt work.

    Any hint to solve this?

    Thanks

    #331870

    Hi!

    Can you paste the contents of your functions.php in Pastebin or Gist?

    Cheers!
    Josue

    #331908

    Here it goes! (sorry, noob here)

    https://github.com/wvhb55/function.php.git

    • This reply was modified 10 years, 1 month ago by wilsonhb.
    #331928

    Hi,

    There is no av_change_logo declared, are you still seeing the fatal error message?

    Also, consider using a child theme, that way you don’t have to touch the theme functions.php directly.

    Best regards,
    Josue

    #332021

    Ok, the site is now back! Thanks a lot

    Does it matter the line in which I paste your suggested code for the logo? Is there a recommendation?

    Cheers

    #332052

    Hi!

    I suggest using this plugin to store custom functions separated from the theme files, once activated you’d just need to paste the code in Plugins > Edit functions.

    Best regards,
    Josue

    #332076

    Thanks for all the help. I’ll download the plugin.

    #332102

    Good, let us know how it goes.

    Cheers!
    Josue

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