• Hello, I’m a total newbie with wordpress and I’m having some trouble to set up a child theme. I can activate the child but I can’t get the childs style.css-file to override the parent. I’m currently using the HealthCare-theme.

    I’ve pasted the following code into the childs style.css

    /*
    Theme Name: Healthcare Child
    Theme URI: https://wordpress:8888/
    Description: This is a child theme of 2014
    Author: sensibilitet
    Template: HealthCare
    Version: 0.1
    */
    @import url(“../HealthCare/style.css”);

    body {
    background:blue;
    }

    Just to try things out. It has worked like a charm on other themes but I can’t manage to get it work with this one. I’ve read several topics on this issue and tried to follow the suggested fixes but with no luck. I’ve never worked with php and are therefore pretty lost when trying to modify the functions.php (which is frequently beeing suggested as a solution to the problem.) Can someone please explain for a total rookie how to fix this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Have you tried using more specific selectors?

    Thread Starter sensibilitet

    (@sensibilitet)

    Yes. For example, I’ve tried this:

    #secondarymenu a {
    display: none;
    }

    .menu-secondary-container {
    border-right: 1px solid #ffffff;
    }

    #footer .container.clearfix {
    background: linear-gradient(to bottom, rgba(193, 37, 39, 1) 0%, rgba(122, 18, 20, 1) 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
    }

    (Just to mention some.) None of it works.

    Can you post a link to your website?

    Thread Starter sensibilitet

    (@sensibilitet)

    Ops, didn’t work. https://studioskau.se/

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Your Child Theme isn’t active. Active it through the dashboard.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    We don’t support your theme by the way, you should contact the people who gave it to you for support.

    Thread Starter sensibilitet

    (@sensibilitet)

    Actually, it was activated but soon after you replied there was a message in the details saying that the child was broke (it wasn’t showing that before) and some weird dialog poped up when previewing the page saying “Cheatin’ huh?” What’s that all about?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Child theme style.css is not overriding parent’ is closed to new replies.