Creating a child theme when styles are loaded by functions.php
-
I am trying to create a child theme for wp-creativix. I realize that the standard way of doing this is by creating a style.css in the child theme directory. The trouble is that there are two stylesheets for this theme (style.php and style.css) and most of the styles are in style.php. Further, the stylesheets are loaded by a function in functions.php. One idea I had was to add my own styles by creating a functions.php in the child theme with:
add_action('wp_print_styles', 'bazqux_add_stylesheet'); function bazqux_add_stylesheet() { $bazqux_style = get_stylesheet_uri(); wp_register_style('bazqux_style', $bazqux_style); wp_enqueue_style('bazqux_style'); }
This does add my stylesheet, but it adds my stylesheet before the wp-creativix stylesheets. I’d like to add my stylesheet immediately after the parent theme’s are loaded so my styles override the parent’s. What’s the best way to do this?
Thank you.
- The topic ‘Creating a child theme when styles are loaded by functions.php’ is closed to new replies.