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.

  • 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 – czerspalace Mar 10 '16 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 '16 at 1:57
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, privacy policy and cookie policy

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