Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header (http://forum.bytesforall.com/forumdisplay.php?f=43)
-   -   How to: save your LOGO/FAVICON images over an upgrades (http://forum.bytesforall.com/showthread.php?t=19169)

juggledad Dec 20, 2012 03:05 PM

How to: save your LOGO/FAVICON images over an upgrades
 
Note: this has been replaced by a theme option in version 3.7.12 and some sites will encounter an error if 'modsec' is installed at there host. The option in the new version avoids this

Here is a neat little trick so you don't have to reupload your LOGO of FAVICON after doing an upgrade. The problem is that the images are stored in the ataualpa/images folder and that gets wiped out during an upgrade and your images are removed. So what do you do?

1) Create a new folder in your wp-contents folder called 'ata-images' and put your logo and favicon there.
2) go to ato->Style & edit HEADER AREA->Show Logo Image? and enter:
HTML Code:

../../../ata-images/your-logo.gif
3) go to ato->Add a FAVICON->Favicon and enter:
HTML Code:

../../../../ata-images/your-favicon.ico
you are done. You won't lose your logo image or favicon during the next upgrade. Oh, be sure to use the names of your logo and favicon.

How does it work?
The logo image is normally in the wp-content/atahualpa/images folder so the path to the image would be:
HTML Code:

mydomain.com/wp-content/themes/atahualpa/images/mylogo.jpg
but when you add a '../' to a path name, you bump up one level so
HTML Code:

mydomain.com/wp-content/themes/atahualpa/images/../mylogo.jpg
becomes
HTML Code:

mydomain.com/wp-content/themes/atahualpa/mylogo.jpg
and
HTML Code:

mydomain.com/wp-content/themes/atahualpa/images/../../mylogo.jpg
becomes
HTML Code:

mydomain.com/wp-content/themes/mylogo.jpg
and
HTML Code:

mydomain.com/wp-content/themes/atahualpa/images/../../../ata-images/mylogo.jpg
becomes
HTML Code:

mydomain.com/wp-content/ata-images/mylogo.jpg


All times are GMT -6. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.