-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
36 lines (34 loc) · 888 Bytes
/
Copy pathheader.php
File metadata and controls
36 lines (34 loc) · 888 Bytes
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
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<?php
switch ( true ) {
case is_front_page():
$metaDescription = get_bloginfo('description');
break;
case is_singular():
$metaDescription = get_the_excerpt();
break;
case is_archive():
$metaDescription = wp_strip_all_tags( get_the_archive_description() );
break;
default:
$metaDescription = '';
}
?>
<html <?php language_attributes(); ?> >
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" >
<meta name="viewport" content="width=device-width, initial-scale=1" >
<?php wp_head(); ?>
<meta name="description" content="<?php echo $metaDescription; ?>" />
</head>
<body <?php body_class(); ?> >
<header class='closed'>
<i class="fas fa-bars toggle-icons"></i>
<?php
wp_nav_menu( array(
'theme_location' => 'main-menu',
'container' => 'nav'
) );
?>
</header>
<?php