Support » Theme: Twenty Thirteen » Child being overridden randomly by Parent theme

  • I am trying to build site with a child of twentythirteen. Things will be good and I’ll get it the way I want, then all the sudden it reverts to the parent theme CSS. This is not due to an update that I did, it just happens sometimes. When I look at my child CSS, it looks like it’s the way I want but for some reason it’s pulling the parent CSS. Anyone else have problems with this? It should be noted, I’m making changes to header and footer and other php files, all in the child folder.

    Anyone know what’s going on?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Actually I would really like it if it only reads my child CSS and completely ignores the parent CSS. Is that possible?

    if it only reads my child CSS and completely ignores the parent CSS

    there is no need to either enqueue the parent themes style.css or use @import for it …

    how are you including the parent theme’s stylesheet right now for your child theme?

    Thanks so much for your help Michael. Right now I have:

    in my child stylesheet, says template: twentythriteen up in the commented out info.
    in my functions.php for child it says: function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }

    So I guess I should change that part in the functions.php? What do I change it to?

    I actually do change a handful of files in my child theme. I copy these files from the parent and then make the changes I want. My best hope is that the files will run only from my child folder. If the file is in there, I want it to be read and not read any info from that particular file from the parent.

    In the past, every time I’ve read about child themes, it says to import and use parent as template. What do you think @alchymyth?

    change that part in the functions.php? What do I change it to?

    if you do not want to include the styles of the parent theme, remove the code, and the line which belongs to it (the one with add_action( 'wp_enqueue_scripts','theme_enqueue_styles'); )

    @alchymyth, thank you. Does that also remove the javascript? I want the js from parent, like my drop down menus and so forth. When I remove the code you mentioned, it seems to be the CSS I’m wanting but then there is no drop down menus for my nav bar (and there should be). I really appreciate your assistance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Child being overridden randomly by Parent theme’ is closed to new replies.