The script that WordPress offered for enqueuing the Parent themes’ style.css into the Child theme was actually inserting two <link rel='stylesheet' links for the Child theme.
To fix this they have an updated version of the script:
|
1 2 3 4 5 6 7 8 |
<?php add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' ); function enqueue_parent_theme_style() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } |
Reference: Codex.WordPress.Org/Child_Themes
The previous version:
|
1 2 3 4 5 6 7 8 9 10 |
/* This is the OLD version - Don't Use! */ <?php add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX); function enqueue_child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style') ); } |