• If I have other css files in my child theme (and parent), are they automatically overwritten? Or do I have to do @import.

    Right now it seems to only be using the parent’s css file. I just want to modify one or two things in that file. How is this different than style.css?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The child theme only uses the child style.css, unless you use the @import

    Any other CSS file added to your child theme wouldn’t do anything unless you enqueue_style it through your child theme’s function.php file. The file can’t do anything unless you tell WP to use it

    Finally, if files in the parent theme call to other css files in the parent theme those files will be loaded. You would need to take some sort of action depending how that file is loaded. Perhaps a hook or filter or something could be used to load your own stylesheet in place.

    You could also use more specific CSS in your child style.css to override what is being done by the parent

    Basically, what you do depends on the scenario. What is being loaded, where, and how

    Thread Starter Jam

    (@pimaniii)

    Thank you for the information! Can you explain or point me to the enqueue style you are talking about?

    Thanks!

    Sure can!

    http://codex.wordpress.org/Function_Reference/wp_enqueue_style

    That is the codex info about it. Give that a look through, you should also be able to Google around and find a variety of tutorials to get some more specific examples should you need them!

    You might also want:
    http://codex.wordpress.org/Function_Reference/wp_dequeue_style

    If a parent theme loads a stylesheet (and does it properly) you can often tell WP not to use that one.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Other css files in child theme?’ is closed to new replies.