This topic contains 13 replies, has 2 voices, and was last updated by  malodk02 2 years, 3 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #106150

    malodk02
    Participant

    I’ve made a child-theme for my changes, and I’ve copied the /colors folder from the parent-theme to the child-theme and made my changes there. So far so good! But for some reason I can’t figure out why the dark.css Ive made my changes to doesnt get loaded when I switch from the default colorscheme to the dark one. What am I missing?

    #106184

    Pratik
    Keymaster

    Hi @malodk02,

    Please post in your site url with dark scheme enabled.

    Regards,
    Pratik

    #106187

    malodk02
    Participant

    Sorry, but that’s not possible. I’m working at localhost.

    #106190

    Pratik
    Keymaster

    Hi @malodk02,

    It will be difficult then. But can you share your child theme with me? Child theme zip file via google drive or dropbox?

    Regards,
    Pratik

    #106191

    malodk02
    Participant

    That I can do 🙂
    catch-box-child.zip

    #106222

    Pratik
    Keymaster

    Hi @malodk02,

    I used your child theme and the dark.css is loading fine. Have you added any CSS codes in Appearance=> Customize=> Additional CSS?

    #106223

    malodk02
    Participant

    I finally found out why it wasn’t working.
    it’s an “error” in the functions.php file in catch-box theme.
    You have used “get_template_directory_uri()” which prevents the color stylesheets from the child-theme to be loaded.
    You should have used “get_stylesheet_directory_uri()” otherwise it won’t work. See this screenshot:

    WordPress Codex

    You should change it in the function.php file for the next update of the theme 😉

    #106227

    Pratik
    Keymaster

    Hi @malodk02,

    Oh!!! It looks like I misunderstood your issue initially.

    It looks like thats the issue. I will forward this to our team and try to address the issue in next update. Thanks for digging into the codes and helping us out.

    Regards,
    Pratik

    #106228

    malodk02
    Participant

    No problem, and again, thanks for all your help 🙂

    #106235

    malodk02
    Participant

    As long as you are fixing errors anyway, I found that you have a duplicate entry in your style.css (the only difference is that the hex-color-code is in small letters in one and in capitals in the other:

    /* =Contactform7
    ----------------------------------------------- */
    
    #content span.wpcf7-not-valid-tip {
        background: none repeat scroll 0 0 transparent;
        border: 0 none;
        color: #FF0018;
        font-size: 12px;
        left: 5px;
        line-height: 12px;
        padding: 2px;
        top: 0;
    }
    
    /* =Contactform7
    ----------------------------------------------- */
    
    #content span.wpcf7-not-valid-tip {
        background: none repeat scroll 0 0 transparent;
        border: 0 none;
        color: #ff0018;
        font-size: 12px;
        left: 5px;
        line-height: 12px;
        padding: 2px;
        top: 0;
    }
    #106669

    malodk02
    Participant

    I noticed that the theme just got an update today, but the “error” mentioned above (about the “get_stylesheet_directory_uri()”) is still not corrected.
    It’s simple enough to correct. You just have to replace “get_template_directory_uri()” with “get_stylesheet_directory_uri()” in the functions.php-file, but it’s annoying to have to do it manually every time the theme get’s updated (even though it’s not something that happens every day).
    …and the duplicate entry in style.css hasn’t been corrected either. Just to let you know.

    #106707

    Pratik
    Keymaster

    Hi @malodk02,

    I apologize for the inconveniences caused. The bug is in testing process and will be live soon. Because of the nature of the bug, we had to do some testing on different installation criteria.

    I hope you understand.

    Regards,
    Pratik

    #108418

    Pratik
    Keymaster

    Hi @malodk02,

    We have reverted the issue because it created a lot of problems for other users. Please check: https://catchthemes.com/support-forum/topic/after-the-update-to-4-6-there-is-no-possibility-to-change-the-color/

    What happened is for users that did not have color css in their child theme, it failed to load any color for them.

    Solution for you would be to add your css for color scheme in the child theme’s styles.css files. This will override any parent theme’s css.

    Regards,
    Pratik

    #108436

    malodk02
    Participant

    I will have to make different child themes for each color that i need (dark and blue) then. Thanks for all your help!

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

The topic ‘dark.css in child-theme won't load’ is closed to new replies.