How can I override Bootstrap css with my child theme css in wordpress?
-
I am trying to load my site’s child theme’s css after Bootstrap CDN css in functions.php file of the child theme. I tried using these code but it doesn’t work. The Bootstrap css is not overriden. What should I do to fix that?
function override_css() { wp_enqueue_style( 'bootstrap.min', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css' ); wp_enqueue_style( 'style', get_stylesheet_directory_uri(). '/style.css', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'override_css' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How can I override Bootstrap css with my child theme css in wordpress?’ is closed to new replies.