-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
28 lines (23 loc) · 914 Bytes
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<?php wp_head(); ?>
</head>
<?php
$classes = [];
if (get_option('show_avatars')) $classes[] = 'show-avatars';
if (is_singular()) $classes[] = 'is-singular';
if (has_post_thumbnail()) $classes[] = 'has-featured-image';
if ($post) {
$blocks = parse_blocks($post->post_content);
if (count($blocks) > 0 && $blocks[0]['blockName'] == 'core/cover') $classes[] = 'has-cover';
}
?>
<body <?php body_class($classes); ?>>
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e('Skip to content', 'cpt-theme'); ?></a>
<div id="page-content" class="site wp-site-blocks">
<?php get_template_part('template-parts/site-header'); ?>
<main id="main" class="site-main wp-block-group">