March 19, 2020 at 11:57 am
#75988
Theme Horse Support Team
Keymaster
Hi Sjoerd,
You have to maintain all of the parent theme dependencies as this theme have more than 1 CSS file. So you need to load Bootstrap CSS before parent theme style.css and then child theme style.css. Please use below code an let us know.
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
$parent_style = 'newscard-style';
wp_enqueue_style( 'bootstrap-style', get_template_directory_uri().'/assets/library/bootstrap/css/bootstrap.min.css', array(), '4.0.0');
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'newscard-child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
Thank you!