- December 5, 2014 at 2:00 pm #10016Talking Stick WebmasterDecember 5, 2014 at 2:00 pmChild Theme – img folder
Talking Stick WebmasterParticipant
Just as information (or as improvement suggestion):
When creating a child theme, the path to the “img” folder no longer works. Indeed the path is relative to the child’s root.
This is easily fixed by copying the folder into the child’s directory, however if these images are to be modified within a new update of the parent theme, these changes won’t be effective in the child automatically.December 8, 2014 at 8:40 am #10019iceableDecember 8, 2014 at 8:40 amReply to: Child Theme – img folder
iceableKeymasterSupportHappy with my help?
Buy me a beer!
Hi, well this is inherent to any child theme, since relative path in a css stylesheet are relative to the stylesheet itself. So of course if you move the stylesheet to the child theme and it was linking to images from the parent theme, the relative path need to be adapted.
There are two options actually:
– Either move the /img/ folder to the child theme as well. This is the best option if you are going to edit/replace the images. If you are not, this is indeed not that good for the reason you mentioned.
– The alternative is to simply update the relative paths so they still point to the parent theme’s /img/ folder.
Using search and replace in your child theme’s /css/theme-style.css, you can use ../../silverclean-lite/img/ instead of ../img/ to access the parent theme’s img folder.
The topic ‘Child Theme – img folder’ is closed to new replies.