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

    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
    Participant

    Hi @malodk02,

    Please post in your site url with dark scheme enabled.

    Regards,
    Pratik

    #106187

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

    #106190
    Pratik
    Participant

    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

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

    #106222
    Pratik
    Participant

    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

    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
    Participant

    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

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

    #106235

    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

    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
    Participant

    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
    Participant

    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

    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.