• Resolved karyah

    (@karyah)


    Hello everyone. I hope you can help me.

    I have a site at https://www.iknowit.it and everything was going well, but this evening i tried a little modify on che style.css (I made a copy of this file before doing anything) in the Child Theme I created in wp-contents/themes/ and i called it hueman-child.
    After my changes on the style.css, i eliminated it cos i didn’t like it, and i re-upped the old version but suddenly everything was upset in my website!
    I tried to disable the child theme and the website went back to the “normal” graphics, but as soon i enable child theme i have got no CSS.
    I tried to download again the basic style.css from the hueman site and i put in it the following code:

    /*
    	Theme Name: hueman-child
    	Theme URI: https://alxmedia.se/themes/hueman/
    	Description: Sample child theme for customization.
    	Author: You
    	Author URI:
    	Template: hueman
    	Version: 1.0.0
    */
    
    @import url("../hueman/style.css");
    
    /* ------------------------------------------------------------------------- *
     *  Theme customization starts here
    /* ------------------------------------------------------------------------- */

    But nothing happens. No CSS in my website.
    I also tried with the full path of the file to import in the CSS instead of .. but nothing.
    I hope you can help me…
    Sorry if i made some mistakes or if i explained in a bad way but i feel really bad..

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter karyah

    (@karyah)

    I found out I can see the CSS only if I click on the blog categories, not anywhere else. I really hope you can help me..

    Hi karyah. I would:
    1. Activate the parent theme
    2. Make sure your site is working ok
    3. Delete the current child theme
    4. Make sure your site is still working ok
    5. Download, install and activate the preconfigured child theme from the theme web site
    6. Check your site; it should still be working and not show any changes.

    If you get to that point, then you can start making your css changes in the child theme style.css file.

    Thread Starter karyah

    (@karyah)

    I tried to backup an older version of my website and everything worked.. The fact that’s surprising me is that now in the child theme i have a full copy of the original theme’s style.css.. that’s incredible.. I really don’t know what happened.. bdbrown thanks for the answer anyway.. can you try to explain what’s happening? Is it not normal?

    in the child theme i have a full copy of the original theme’s style.css.

    No, that’s not normal. You should leave the original css in the parent theme. Your child theme style.css file should only contain styles you want to add or change. If you don’t have the @import statement in the child theme css file then you need to enqueue the parent theme css in your child theme functions.php file.

    Thread Starter karyah

    (@karyah)

    I know, i tried several times, before doing backup, to put only the style.css of the child theme with the @import statement but nothing happened.. It’s really wierd. Do you think i should try with the php function? The fact is that now I’m little afraid to change again and risk to upset the website again..

    Have you followed the steps I outlined above? If you’ve already made custom css styles then save them somewhere first; you can reapply them later. You need to have a stable parent theme before you can troubleshoot the child theme issues.

    Thread Starter karyah

    (@karyah)

    I installed again the theme and, after i activated it, i got everything work perfectly.
    Then i installed the child theme (that created me a folder called hueman-child-master) and wordpress associated it to the parent theme Hueman. Well.
    Now the home was okay, but when i tried to open an article i got the CSS disappear in all the page and i haven’t modified anything, in fact the style.css now is:

    /*
    	Theme Name: Hueman Child
    	Theme URI: https://alxmedia.se/themes/hueman/
    	Description: Sample child theme for customization.
    	Author: You
    	Author URI:
    	Template: hueman
    	Version: 1.0.0
    */
    
    @import url("../hueman/style.css");

    The installation is clean now, i also tried to import all the changes i made in the other .php files (not in the CSS) on the old child theme, but i still have this CSS problem only if I open the single post. I think other things are in disorder cos I have to reset them in the theme options (sidebar, alxtab, ecc).
    Why do i get this problem?

    Thread Starter karyah

    (@karyah)

    Now i don’t understand the reason why i get this problem only with single posts. Other little things such as alxtabs and sirebar and footer i think are in disorder because i have to set them back in the theme options. I also tried to restore the changes i made on the .php files in the old child theme (not in the CSS), but nothing worked. Can i solve this problem on the single post page?

    EDIT: double post, sorry.

    Now the home was okay, but when i tried to open an article i got the CSS disappear in all the page and i haven’t modified anything,

    So, when you reinstalled the parent theme, everything was working ok, including the single posts? Then you installed and activated the child theme, but didn’t make any other changes, and now the single posts don’t work? But I just checked your site and it appears that now the home page is not working but the single posts are fine?

    For the time being can you disable your cache and minify plugin(s)? That way we can see the pages being generated in real time instead of from a minimized cached copy.

    Thread Starter karyah

    (@karyah)

    Thanks!! So the cache plugin was showing me the “fake” version of the pages! So i think the previous version of the site, when i modified the style.css before I reinstalled everything, was good too but it was showed bad because of that plugin.. I should have done it before.. it would have been 2 days less of sweat from you and me ??
    Thank you a lot bdbrown, you helped me so much!

    Glad that helped. Are you good now or are there still CSS issues?

    Thread Starter karyah

    (@karyah)

    Up to now it seems like I don’t see any CSS issue! I also modified the scrolling subheading i asked in the other post, and everything is okay! Now I am free to mdofy in the child without any risk and my site has a new clean installation.
    Thanks a lot again, if i have more questions about i’ll ask again here on this forum ??

    Now I am free to mdofy in the child without any risk

    Well, it’s never without risk ?? Just make sure you have a good backup. Glad you got it working. If you don’t have any further questions please mark the topic as resolved. Thanks.

    Thread Starter karyah

    (@karyah)

    thanks again ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Problems with style.css in Child Theme’ is closed to new replies.