Child theme doesn’t overridw
-
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]
The topic ‘Child theme doesn’t overridw’ is closed to new replies.