Skip to content

Commit af6f488

Browse files
authored
Update header.php
1 parent c68531d commit af6f488

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

header.php

+11-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,17 @@
4343
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono&display=block">
4444

4545
<?php
46-
// inline the theme's main stylesheet
47-
$style_path = get_stylesheet_directory() . '/style.css';
48-
if ( is_readable( $style_path ) ) {
49-
?><style><?php readfile( $style_path ); ?></style><?php
46+
// inline parent theme's stylesheet
47+
$parent_style_path = get_template_directory() . '/style.css';
48+
if ( is_readable( $parent_style_path ) ) {
49+
?><style><?php readfile( $parent_style_path ); ?></style><?php
50+
} ?>
51+
52+
<?php
53+
// inline child theme's stylesheet
54+
$child_style_path = get_stylesheet_directory() . '/style.css';
55+
if ( is_readable( $child_style_path ) ) {
56+
?><style><?php readfile( $child_style_path ); ?></style><?php
5057
} ?>
5158

5259
<?php wp_head(); ?>

0 commit comments

Comments
 (0)