Child theme and customization

Homepage Forums Free Support Forum Silverclean Lite Silverclean Lite Support Child theme and customization

Child theme and customization

This topic contains 7 replies, has 2 voices, and was last updated by  Talking Stick Webmaster 3 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10003
    Child theme and customization

    Talking Stick Webmaster
    Participant

    Hello,

    I’m trying to customize the theme. I’ve created a child theme and I’m trying to get ANYTHING changed from the child’s “style.css” without any success…
    For example, easy enough, the background color: chrome debug tells me that this value is set in “theme-style.css” (?v4.0.1). By changing it there, no better luck.
    What am I missing here?

    #10004
    Reply to: Child theme and customization

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    Style.css is enqueued last so the rules you add to it can override those from theme-style.css since they will get higher priority.

    Also Silverclean lite will use [child-theme]/css/theme-style.css if it exists instead of [parent-theme]/css/theme-style.css. So if you’d rather edit the file rather than adding overriding rules, you can simply copy the /css/ folder from the main theme to your child theme and edit theme-style.css from there.

    However about the specific value you mention: this is weird because there is no background-color set in theme-style.css. The background of this theme is white because no value is not explicitly set.

    #10005
    Reply to: Child theme and customization

    Talking Stick Webmaster
    Participant

    In theme-style.css, line 809:

    body {
    	background: #fff;
    	color: #444;
    	-webkit-text-size-adjust: 100%;
    	-ms-word-wrap: break-word;
    	word-wrap: break-word;
    }

    Plus, copying the css folder to the child theme didn’t help…

    It seems that the page points to a theme-style.css version that is created in the parent theme which has nothing to do with the actual file “theme-style.css” located in the css folder. Which makes no sense to me, but…

    As another example: I inserted `#main-wrap {
    background-color: green;
    }` in my child’s style.css, but there is absolutely no effect.

    #10006
    Reply to: Child theme and customization

    Talking Stick Webmaster
    Participant

    Alright, this is getting so weird…
    Suddenly the green background has shown up! (see pic_1)
    Then I tried to change it to blue again. (see pic_2)
    -> page is still green (also with emptying the cache)

    Attachments:
    You must be logged in to view attached files.
    #10009
    Reply to: Child theme and customization

    Talking Stick Webmaster
    Participant

    and with google debug, the background is still set to green, as read in: the child’s style.css!!! (see pic_3)

    What is going on here?
    Sorry for the insistence but I’m getting very confused.

    Thanks.
    VincenT

    Attachments:
    You must be logged in to view attached files.
    #10011
    Reply to: Child theme and customization

    Talking Stick Webmaster
    Participant

    Further information:
    1.
    Now that the style.css has been applied (green background), the flickering of the navigation bar is fixed (see other topic). Somehow the style.css file is not loaded all the time…

    2.
    This has nothing to do with “child-theme”. Simply by editing the style.css (e.g. body{ background-color: green; } in the WordPress Editor doesn’t affect the behavior of the page at all! Or at least not consistently.

    Hope that heps…
    Cheers.

    #10012
    Reply to: Child theme and customization

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    This all sounds clearly like caching issue, maybe not with your browser but on your site: either you are using a caching plugin, or your host caches your site.
    This makes sense since every change you try to make doesn’t seem to apply right away, but it does suddenly apply a moment later.

    It is also possible that you see the current version of a file in chrome’s devtools while a cached version is applied in the viewport, (I do experience it on a regular basis when I just made some changes to a file, looks like devtools manage to pull the actual current file more efficiently).

    If you are using a caching plugin on your site, make sure to empty the cache every time you make a change or better yet: use a plugin with a setting to not cache any page when logged in as admin.

    And if this doesn’t come from your browser, computer or site settings, then this might be your hosting provider – I’ve already some cheap hosts cache almost everything to save bandwidth, which was causing a few hours of latency and made development and live testing a real nightmare.
    You may want to try and their support about it, but if your host does this chances are you’ll have to either deal with it or switch hosts.

    #10014
    Reply to: Child theme and customization

    Talking Stick Webmaster
    Participant

    Yeeees, that’s it! 🙂

    My host (SiteGround not to mention it…) installs a cache plugin (SG CachePress) alongside the WordPress installation!
    That’s why re-installing WordPress didn’t help… (and drove me crazy!)…
    wordpress plugins, plugins, plugins…

    THANK YOU SO MUCH!!!

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

The topic ‘Child theme and customization’ is closed to new replies.


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