Theme Name: Twenty Sixteen – Child
Enqueue the parent and child theme stylesheets because using @import increases the amount of time it takes style sheets to load.
add a wp_enqueue_scripts action in a function.php file
Setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet loads after it.
Including the child theme version number ensures that you can bust cache also for the child theme. See a more detailed discussion on Stack Exchange:
The complete (recommended) example becomes:
where |parent-style| is the same |$handle| used in the parent theme when it registers its stylesheet.
For example, if the parent theme is twentyfifteen, by looking in its functions.php
for its |wp_enqueue_style()| call, you can see the tag it uses there is |’twentyfifteen-style’|. In your child code, replace the instance of |’parent-style’| with |’twentyfifteen-style’|, like so:
$parent_style = ‘twentyfifteen-style’;
Failure to use the proper tag will result in a CSS file needlessly being
loaded twice. This will usually not affect the site appearance, but it’s
inefficient and extends your page’s loading time.
*Note:* You may need to re-save your menu (Appearance > Menus, or
Appearance > Customize > Menus) and theme options (including background
and header images) after activating the child theme.