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?
- Can’t disable child theme style
- How to override JavaScript files in child theme?
- How do I dequeue a parent theme’s CSS file?
- How to add code to Header.php in a child theme?
- Why does my child theme CSS get called twice?
- Is it ever okay to include inline CSS in plugins?
- How important is it to enqueue a theme’s stylesheet?
- How can I get a list of all enqueued scripts and styles?
- How to add crossorigin and integrity to wp_register_style? (Font Awesome 5)
- Style custom columns in admin panels (especially to adjust column cell widths)
- How do themes provide support for child themes?
- Remove Open Sans from Twenty Twelve theme
- Preserving theme settings in child theme
- Is it possible to make grandchild themes?
- How to load scripts/styles specific for a page
- How to cache bust a child theme style.css
- Enqueue Google Web Fonts Without Messing Up Symbols In URL
- Inbuilt style for jquery-ui-datepicker
- Child themes CSS priority problems without using !important
- Why is style.css not being enqueued?
- How to conditionally enqueue a stylesheet only for a certain page(s)?
- Enqueue a stylesheet for login page and make it appear in head element
- How to enqueue style before style.css
- WordPress admin stylesheet
- How to add stylesheets only to pages with specific shortcode?
- Is a text-domain necessary for a child theme