• I’ve installed a child theme of a theme I bought but it doens’t override original theme properly. It seems to get overwritten by the modules.min.css file from the original theme.

    My custom css shows when I inspect the element and it works if I add “!important” to the css file I however don’t think this is a durable way to customize.

    This is the functions.php fil that came with the theme
    <?php
    /*** Child Theme Function ***/
    if ( ! function_exists( ‘wilmer_mikado_child_theme_enqueue_scripts’ ) ) {
    add_action( ‘wp_enqueue_scripts’, ‘wilmer_mikado_child_theme_enqueue_scripts’ );
    function wilmer_mikado_child_theme_enqueue_scripts() {
    $parent_style = ‘wilmer-mikado-default-style’;
    wp_enqueue_style( ‘wilmer-mikado-child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( $parent_style ) );
    }
    }

    Do I need to add something to make the style.css file in the child theme to override css from the main theme so I don’t need to use !important for every line of css I write?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @elianneruyter,

    I see that your thread has not been marked as resolved, so I will attempt to assist you.

    Sorry to ask a potentially obvious question – but I just wanted to check that you have indeed activated your child theme. If it is just sat in the themes list but not active, then your overrides won’t work.

    If the child theme has been properly created and is active then your overrides should automatically take effect.

    Kind Regards,
    Tim

Viewing 1 replies (of 1 total)

The topic ‘Child theme doesn’t overridw’ is closed to new replies.