Your child theme’s stylesheet
will usually be loaded automatically. If it is not, you will need to enqueue
it as well. Setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet
loads after it.
/**
* Enqueue theme styles (parent first, child second)
*
*/
function wpse218610_theme_styles() {
$parent_style="parent-style";
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/woocommerce/woo.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/woocommerce/woo.css', array( $parent_style ) );
}
add_action( 'wp_enqueue_scripts', 'wpse218610_theme_styles' );
Note: take a look in the Theme Developer Handbook for some extra information.
Related Posts:
- Why is the Child Theme Stylesheet Not Loading?
- Style.css in child theme is loaded before Bootstrap
- How can I get this child theme stylesheet to properly load? Or if it is correct, why doesn’t my child theme appearance match the parent?
- How to create my own style.css file in an wordpress child-theme
- Versioning @import of parent theme’s style.css
- Attributing a version number to a child theme’s main stylesheet
- how do I queue my Child stylesheet/s *after* every Parent stylesheet/statement?
- Issues enqueueing parent & child theme stylesheets with revised Codex method
- Get parent theme version
- How to use parent theme’s enqueue methods
- How to maintain wp_enqueue_style dependencies set in parent theme style enqueuing
- How Can I Use A Child Theme Effectively When Parent’s CSS Is Located in a ‘CSS folder’?
- How can I make new .css file in child theme override styles in child theme’s style.css
- Disable child theme css on certain pages
- Enqueue styles properly in a child theme and stylesheets location
- Child Theme Not Overriding Parent Theme
- How are updates to the style.css file in child theme recognized?
- How do I set up a child-theme without using @import
- Find a Parent Theme’s stylesheet $handle when it registers a stylesheet
- Dequeue only stylesheets but not inline style added using wp_add_inline_style
- Understanding child theme functions.php
- Overwrite CSS with without deleting it
- De-registering parent style sheet css recommended?
- Enqueue stylesheets if parent theme has more than one .css file
- ERROR MESSAGE: Missing index.php—Child Theme
- Priority loading file css in child theme
- Is my child theme working properly
- Child theme style repeated
- How to NOT call Font Awesome or font icons in WordPress
- @font-face broken in child theme
- Prevent a base themes css file from loading
- Child Theme vs. Jetpack Editor
- WordPress Child theme’s css not loading
- Different ways to load child theme css
- Parent theme CSS overriding child CSS rules
- How do add a the style-mobile css from the main theme to the child theme?
- Child theme style.css isn’t overwriting parent style.css
- Confused about how to use wp_enqueue_style
- How to use custom stylesheet only for a template in child theme
- Order of stylesheets in child theme
- Child theme problem
- why this media query is not working / not loading when I put it in child theme?
- Child theme stylesheet not always overriding “index”
- Child style loads before all parent styles
- Child Theme CSS not showing at all
- What is the correct workflow for modifying child themes?
- CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
- Parent theme styles overriding child theme CSS [closed]
- Child theme not importing parent styles
- How to make child theme in wordpress with wp_enqueue_style ? Using Enough Theme
- get_template_directory_uri() links to child theme not parent
- Set a link in child theme style.css to jump to #main [closed]
- Stylesheet overriding in Child theme
- Two stylesheets acting on one element
- WordPress Child Theme – twentyeleven
- Modify Twentyeleven child theme CSS – How to change body font size?
- Can only override parent theme styling with ‘!important’ in child style.css
- Why would the child theme load in the Customize preview, but not on the site itself?
- Why does using wp_register_style without wp_enqueue load and print CSS tags in the front-end?
- How to enqueue stylesheets in child-theme functions.php?
- Dequeing Parent Fontawesome Deques Parent Styles
- Remove Stylesheet by URL that has not been enqueued
- How to enqueue multiple style sheets into my child theme in wordpress (oceanwp)
- My Child Theme CSS Isn’t Working
- Font size decreases when child theme is created from parent theme?
- Enqueuing multiple stylesheets with a child theme
- Child Theme not loading multiple stylesheets
- how to fix loading scripts in child theme?
- How to override styles from child theme if all the styles are in a folder?
- Modify arguments for parent theme’s `wp_register_style` via child theme
- Why won’t my Custom CSS Load
- Why are my parent styles loading after my child styles?
- Browser stacks different versions of style.css
- How to activate the child theme in WordPress?
- How do I dequeue a parent theme’s CSS file?
- WordPress admin stylesheet
- Child theme does not overwrite parent themes style.css
- How do I override a parent theme’s language files with a child theme?
- How to solve “Warning: Use of undefined constant” when overriding a parent theme function in the child theme?
- get_template_directory vs get_stylesheet_directory
- Developing a childtheme, how to disable the parents templates?
- Adding or modifying in files of parent theme via child’s function.php
- I want to include my style.css in function.php file?
- Is it possible to change the path of a css file that is registered through wp_enqueue_style()?
- Child Theme Path Being Ignored With wp_enqueue_scripts
- bbpress change the word forum, topic, reply in the forum to another word I choose
- Enqueue Style Only On Certain Pages Not Working
- Child theme works in local environment but is not working on remote
- Tesseract child theme loads slow [closed]
- CSS not affecting widget output
- How Child Themes Directory works for plugins?
- Why is this jquery / java script code not working in mobile / in devices?
- theme style is applied on the dhasboard rather than the website
- CSS not being applied using wp_enqueue_style
- WordPress childtheme not loading any CSS/SCSS
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- CSS in child theme to replace !important in parent theme
- Installation directory for WordPress and child theme
- How to make CSS load live based on options clicked in the theme customizer?
- How enqueue CSS out of theme folder?