Child Theme – img folder

Homepage Forums Free Support Forum Silverclean Lite Silverclean Lite Support Child Theme – img folder

Child Theme – img folder

This topic contains 1 reply, has 2 voices, and was last updated by  iceable 3 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10016
    Child Theme – img folder

    Talking Stick Webmaster
    Participant

    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.

    #10019
    Reply to: Child Theme – img folder

    iceable
    Keymaster
    Support
    Happy 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.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Child Theme – img folder’ is closed to new replies.


PayPal Verified
Secured by PayPal
Secure Credit Card payments powered by Stripe
SiteLock