-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
171 lines (159 loc) · 6.77 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!doctype html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, height=device-height, minimum-scale=1.0, initial-scale=1.0,
maximum-scale=2.0, user-scalable=yes, shrink-to-fit=no">
<?php if (!has_site_icon()) { ?>
<link href="<?php echo JP_FAVICON . '/apple-touch-icon.png'; ?>" rel="apple-touch-icon" sizes="180x180">
<link href="<?php echo JP_FAVICON . '/favicon-16x16.png'; ?>" rel="icon" type="image/png" sizes="16x16">
<link href="<?php echo JP_FAVICON . '/favicon-32x32.png'; ?>" rel="icon" type="image/png" sizes="32x32">
<link href="<?php echo JP_FAVICON . '/site.webmanifest'; ?>" rel="manifest">
<link href="<?php echo JP_FAVICON . '/safari-pinned-tab.svg'; ?>" rel="mask-icon" color="#146994">
<link href="<?php echo JP_FAVICON . '/favicon.ico'; ?>" rel="shortcut icon">
<meta name="apple-mobile-web-app-title" content="<?php bloginfo('name'); ?>">
<meta name="application-name" content="<?php bloginfo('name'); ?>">
<meta name="msapplication-TileColor" content="#146994">
<meta name="msapplication-config" content="<?php echo JP_FAVICON . '/browserconfig.xml'; ?>">
<meta name="theme-color" content="#146994">
<?php } ?>
<?php wp_head(); ?>
</head>
<body id="top" <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php skip_to_content('content'); ?>
<?php /** Sitelinks searchbox */
if (is_front_page()) { ?>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "<?php bloginfo('name'); ?>",
"url": "<?php echo home_url('/'); ?>",
"description": "<?php bloginfo('description'); ?>",
"potentialAction": {
"@type": "SearchAction",
"target": "<?php echo home_url('/') . '?s={s}'; ?>",
"query-input": "required name=s"
}
}
</script>
<?php } ?>
<?php /** Organization + Logo */ ?>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"name": "<?php bloginfo('name'); ?>",
"url": "<?php echo esc_url(home_url('/')); ?>",
"logo": "<?php echo get_logo_url(); ?>",
"sameAs": [
"https://www.facebook.com/organization-profile",
"https://twitter.com/organization-profile",
"https://plus.google.com/organization-profile",
"https://www.instagram.com/organization-profile",
"https://www.youtube.com/organization-profile",
"https://www.linkedin.com/organization-profile",
"https://myspace.com/organization-profile",
"https://ru.pinterest.com/organization-profile",
"https://soundcloud.com/organization-profile",
"https://www.tumblr.com/organization-profile"
]
}
</script>
<?php /** Person */ ?>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Person",
"name": "<?php _e('Kudinov Fedor', 'joompress'); ?>",
"url": "<?php echo esc_url(home_url('/')); ?>",
"sameAs": [
"https://www.facebook.com/your-profile",
"https://twitter.com/your-profile",
"https://plus.google.com/your-profile",
"https://www.instagram.com/your-profile",
"https://www.youtube.com/your-profile",
"https://www.linkedin.com/your-profile",
"https://myspace.com/your-profile",
"https://ru.pinterest.com/your-profile",
"https://soundcloud.com/your-profile",
"https://www.tumblr.com/your-profile"
]
}
</script>
<?php /** Article */
if (is_single()) {
global $post;
setup_postdata($post);
$image = wp_get_attachment_image_url(get_post_thumbnail_id($post->ID), 'full');
?>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "<?php the_permalink(); ?>"
},
"headline": "<?php the_title(); ?>",
"image": "<?php echo $image; ?>",
"datePublished": "<?php echo get_the_date('c'); ?>",
"dateModified": "<?php the_modified_date('c'); ?>",
"author": {
"@type": "Person",
"name": "<?php the_author(); ?>"
},
"publisher": {
"@type": "Organization",
"name": "<?php bloginfo('name'); ?>",
"logo": {
"@type": "ImageObject",
"url": "<?php echo get_logo_url(); ?>"
}
},
"description": "<?php echo strip_tags(get_the_excerpt()); ?>"
}
</script>
<?php } ?>
<!-- HEADER -->
<span class="empty-space js-header-space" aria-hidden="true"></span>
<header class="header js-header">
<div class="container header-wrap">
<div class="logo header-logo">
<?php if (has_custom_logo()) {
the_custom_logo();
} else {
logo('logo.png');
} ?>
</div>
<div class="header-search"><?php get_search_form(); ?></div>
<?php hamburger('js-hamburger header-hamburger'); ?>
</div>
</header>
<!-- /END HEADER -->
<?php get_template_part('template-parts/navigation/menu', 'header'); ?>
<!-- WRAPPER -->
<div class="wrapper">
<div class="container">
<?php if (is_front_page()) { ?>
<h2 class="blog-name"><?php bloginfo('name'); ?></h2>
<p class="blog-description"><?php bloginfo('description'); ?></p>
<div style="margin-bottom: 16px;"><?php google_map(); ?></div>
<?php if (is_customize_preview()) { ?>
<div style="margin-bottom: 16px;"><?php social(); ?></div>
<div style="margin-bottom: 16px;"><?php phones(); ?></div>
<div style="margin-bottom: 16px;"><?php messengers(); ?></div>
<div style="margin-bottom: 16px;"><?php (new GoogleReCaptcha())->htmlMarkup(); ?></div>
<p>
<button class="btn customizer-edit" data-control='{ "name":"jp_analytics_google_placed" }'>
<?php esc_html_e('Edit Analytics Tracking Code', 'joompress'); ?>
</button>
<button class="btn customizer-edit" data-control='{ "name":"jp_login_logo" }'>
<?php esc_html_e('Edit Login Logo', 'joompress'); ?>
</button>
</p>
<?php } ?>
<?php } ?>
</div>