Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   child theme problem (http://forum.bytesforall.com/showthread.php?t=17491)

twinisles May 5, 2012 04:26 PM

child theme problem
 
I am trying to use a child theme to avoid images (header, logo, favicon) being over-written every time the theme is updated.

I created a folder 'atahualpa-child' in wp-content/themes and within that created style.css containing:

/*
Theme Name: atahualpa-child
Template: atahualpa
*/

@import url("../atahualpa/style.css");

I then created an 'images' folder within 'atahualpa-child', and 'favicon' and 'header' folders within 'images'. I uploaded the header image to 'header', favicon to 'favicon' and logo to 'images'.

I activated the child theme and all appeared well.

However, when I updated Atahualpa the custom images were not displayed on the site.

I would like to use Atahualpa to provide a flexible Web site for a non-technical user, and its customizability seems to fit the bill other than the images being lost.

Many thanks in advance for any advice.

lmilesw May 5, 2012 06:35 PM

One way I get around having to use a child theme and the overwritten images issue is to use a plugin like Cimy header image rotator for the header images.

For the favicon and logo you can put the images in a folder that won't get overwritten and then use ../ each time you want to go back a folder. For instance I created a folder in the themes folder called ataimages and put the logo there then in the "Show logo image?" box I put
HTML Code:

../../ataimages/logo.png
You could do the same for the favicon.

Knut Sparhell May 8, 2012 12:38 AM

When using a child theme, only the style.css will be drawn from the child theme exclusively. For template files, the child theme will be searched first, then the parent, as duplicates in the parent will be ignored. For all other files this is (parent) theme dependent, as this is no rules. A parent them may be child theme aware, and point to the "stylesheet directory" and below. This will be your child theme folder, if a child theme is active. Atahualpa does not support this, as I can see.

In upcoming WordPress 3.4 you may select a header image from the media library directly. If Atahualpa will support this core function it would be great. There is also a suggestion to have icon upload (favicon) in core, probably in 3.5.

Many themes, Twenty Eleven among them, does not get their custom images overwritten during an update because they allow using a set of images uploaded to the media library.

kingster May 16, 2012 01:55 PM

I do the same, and actually link all the way into my media library (you *can* do that)...

Along the lines of setting logo (or favicon) to:
Code:

../../../uploads/2012/05/mysnazzylogo.png
For the header images... Create another folder somewhere accessible to the webserver and convert /wp-content/themes/atahualpa/images/header/ to a symlink... e.g.:
Code:

ln -s /var/www/myheaderimages /var/www/wp-content/themes/atahualpa/images/header
You'll still have to "relink" the directory every time, but it's still better than a poke in the eye with a sharp stick.


All times are GMT -6. The time now is 01:33 PM.

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