• This seems like a common problem but as I modify my child themes style.css the parent style.css rules override any changes I make.

    One of the main solutions seems to be correctly enqueue your functions.php file. I have no experience in php but I have copy and pasted a number of versions of doing so with no luck. Here is my functions.php code in my child theme folder.

    <?php
    //
    // Recommended way to include parent theme styles.
    //  (Please see http://codex.wordpress.org  /Child_Themes#How_to_Create_a_Child_Theme)
    //  
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array('parent-style')
    );
    }
    //
    // Your code goes below
    //

    My parent theme is Adios.

    I am locally hosting my site so I can’t share a link to it.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Parent theme css overriding child css rules’ is closed to new replies.