-
AuthorPosts
-
October 7, 2014 at 1:18 am #331246
Hi,
Is there a way to upload a logo for the blog (different from the one in the main page?
Thanks!
October 7, 2014 at 1:51 am #331254Hey 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!
YigitOctober 7, 2014 at 3:06 am #331301Thanks, 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
October 7, 2014 at 3:43 am #331319Plus the web is offline :(
October 7, 2014 at 5:39 pm #331795Hi!
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 nameadd_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!
YigitOctober 7, 2014 at 8:20 pm #331866Hi 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
October 7, 2014 at 8:27 pm #331870October 7, 2014 at 9:56 pm #331908Here it goes! (sorry, noob here)
https://github.com/wvhb55/function.php.git
- This reply was modified 10 years, 2 months ago by wilsonhb.
October 7, 2014 at 10:29 pm #331928Hi,
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,
JosueOctober 8, 2014 at 2:17 am #332021Ok, 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
October 8, 2014 at 3:11 am #332052Hi!
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,
JosueOctober 8, 2014 at 4:07 am #332076Thanks for all the help. I’ll download the plugin.
October 8, 2014 at 5:00 am #332102Good, let us know how it goes.
Cheers!
Josue -
AuthorPosts
- You must be logged in to reply to this topic.