how do I queue my Child stylesheet/s *after* every Parent stylesheet/statement?


I’m using the well-written Oenology theme by Chip Bennett as the Parent to my own Child theme.

In my development process, I’ve discovered that there are some challenges for people writing Child themes when it comes to controlling styles.

I’ve just discovered that my main style.css file gets loaded before every other stylesheet link or statement in <head>, and this explains why I was having trouble overriding some of the Parent styles.

further study of the problem shows that various Parent stylesheets and styles can be queued in the <head> in three places; add_action('wp_print_styles', , add_action('wp_enqueue_scripts', , and then add_action('wp_head', .

to keep things simple, I’m planning to create two stylesheets. the first main ‘style.css’ sheet would only include the @import url() command, needed to load Oenology’s main stylesheet.

the second stylesheet would contain my Child rules. to make sure that it’s loaded after all of the other rules, I’d queue it using add_action( 'wp_head', .

does this sound reasonable? or is there a better (more correct) way to do it?

btw, does anyone know what ‘/parent-theme/style.css?MRPreviewRefresh=723‘ means?


wp_enqueue_style() doesn’t appear to work in wp_head().


Gregory 4 months 0 Answers 14 views 0

Leave an answer