0

Why is wordpress still using the bootstrap.css from the parent theme, whenI have a child theme which (successfuly for other things) inherits the parent theme? I have the bootstrap.css settled in the child theme inside the same directory css/ and I can see in firebug that on the page the parent's bootstrap.css is still used.

2
  • 1
    WordPress will enqueue all the child theme styles and then enqueue all the parent theme styles. If you want to remove the parent theme style, you have to find out what handle they used to register the style and then call wp_dequeue_style( $handle ) You also have to make sure this runs after the parent has enqueued their bootstrap Mar 10, 2016 at 1:54
  • Its about how to handle function wp_enqueue_scripts. Here for your answer wordpress.stackexchange.com/a/65526/18731
    – Jevuska
    Mar 10, 2016 at 1:57

1 Answer 1

1

you need to enqueue styles in child theme's function.php to override parents styles. if you want to completely removed parent's bootstrap css then use wp_dequeue_styles() function and enqueue new bootstrap css in child theme's function.php

http://wpsites.net/web-design/how-to-deregister-dequeue-style-sheets/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.