-
Notifications
You must be signed in to change notification settings - Fork 7
/
header.php
46 lines (32 loc) · 1.46 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
<?php
$google_analytics_tracking_id = get_field( 'google_analytics_tracking_id', 'option' );
$head_tags = get_field( 'head_tags', 'option' );
?>
<!DOCTYPE html>
<html class="u-h-full" <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="<?php bloginfo(); ?>">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="<?php bloginfo(); ?>">
<?php wp_head(); ?>
<?php if ( $google_analytics_tracking_id ) : ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo $google_analytics_tracking_id; ?>"></script>
<script>
const gaId = '<?php echo $google_analytics_tracking_id; ?>';
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<?php echo $google_analytics_tracking_id; ?>');
</script>
<?php endif; ?>
<?php echo $head_tags ? $head_tags : ''; ?>
</head>
<body <?php body_class( 'js-body' ); ?>>
<?php get_template_part( 'partials/global/header' ); ?>
<section class="u-flex-1 u-py-40 md:u-py-80">