-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·77 lines (73 loc) · 2.49 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Header Template
* @package SimpleCharm
* @since 1.0
* */
if(!defined('ABSPATH')) {
exit; // Exit if accessed directly
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
}else {
do_action( 'wp_body_open' );
}
?>
<a class="skip-link screen-reader-text" href="#simplecharm-content">
<?php _e( 'Skip to content', 'simplecharm' ); ?></a>
<header class="simplecharm-text-center" role="banner">
<div class="simplecharm-header">
<div class="simplecharm-header-contents">
<span>
<?php
if(has_custom_logo()){
the_custom_logo();
}
?>
<?php if(display_header_text()){
?>
<h1 class="simplecharm-site-title simplecharm-model-shadow simplecharm-model-link">
<a href="<?php echo esc_url(home_url('/')); ?>" rel="home">
<?php bloginfo('name'); ?>
</a>
</h1>
<p class="simplecharm-site-description">
<?php bloginfo('description'); ?>
</p>
<?php
}
?>
</span>
<nav role="navigation" class="simplecharm-main-navigation">
<?php
if(has_nav_menu( "simplecharm_header" )){
wp_nav_menu( [
'theme_location' => 'simplecharm_header',
] );
}
?>
<span><?php get_search_form(); ?></span>
</nav>
</div>
<?php if(has_header_image()): ?>
<div class="simplecharm-header-image">
<img alt="header-image" src="<?php header_image(); ?>"
width="<?php echo absint( get_custom_header()->width ); ?>"
height="<?php echo absint( get_custom_header()->height ); ?>">
</div>
<?php endif; ?>
</div>
</header>
<br>
<br>
<main role="main" id="simplecharm-content" tabindex="-1">