• So this is my first support post, I’ve searched everywhere else but can’t seem to find a solution. I’m running wordpress on my localhost and have recently gotten into child themes. My main theme’s css is linked to my child theme via @import and seems to be working fine. It shows up in my wordpress themes and then some of the changes even appear when I make them.

    Problem is, when I go to change some things like the font size or the color of some of my headers, nothing happens. I use chrome developer tools and I can actually see my changes there but they are scratched out as though the parent themes css styles are overriding my own. Anyone have this happen before?

    And Im also using WAMP server.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Try placing !important right next to the styles that don’t seem to be changing. !important should place priority on these styles if for some reason the stylesheet doesn’t want to listen. So for example,

    p {
    color: #fff !important;
    font-size: 2em !important;
    }

    Please let me know if this works.

    Andrew

    Thread Starter dorianstevens

    (@dorianstevens)

    Thanks for the reply Andrew but it didn’t work. This is driving me nuts!

    What theme are you using? You might also try using more specific selectors, e.g.:

    .entry-content p { ... }

    instead of just

    p { ... }

    Thread Starter dorianstevens

    (@dorianstevens)

    I’m using a theme called pilot fish. I use chrome’s developer tools to inspect the code so I’m putting in the specific styles. When I play with the css in the developer tools it changes the content, but when I copy and paste the code into the styles editor in wordpreas nothing happens.

    Unfortunately, because of the way your theme loads its stylesheet, you won’t be able to use the @import method to create a child theme. Instead, you should remove the @import line from your child theme’s stylesheet and create a file named functions.php in your child theme’s folder with this code:

    <?php
    
    function load_styles() {
      wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
      wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
    }
    add_action( 'wp_enqueue_scripts', 'load_styles' );

    Also, can you post an example of some CSS you’ve tried that isn’t working?

    Thread Starter dorianstevens

    (@dorianstevens)

    Thanks stephen, so am I supposed to copy and paste this exact code or do I input my themes information somewhere in there?

    You can copy that exact block of code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Only some changes in child theme show up’ is closed to new replies.