How to get child theme to have priority of parent theme
-
Hello all,
Below we have provided the functions .php in the child theme
<?php // Queue parent style followed by child/customized style add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', PHP_INT_MAX); function theme_enqueue_styles() { wp_enqueue_style( 'sydney-pro-ii', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'sydney-pro-ii-child', get_stylesheet_directory_uri() . '/style.css', array( 'sydney-pro-ii' ) ); wp_enqueue_style( 'sydney-pro-ii-child-tom', get_stylesheet_directory_uri() . '/tom.css' ); ?>
The priorities work fine but the functions code that you can see above is being loaded in twice, how would we go about fixing this?
Many thanks
Tom
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘How to get child theme to have priority of parent theme’ is closed to new replies.