-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
63 lines (53 loc) · 2.09 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
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<title><?php bloginfo("name"); ?> — <?php echo is_front_page() ? "Home" : wp_title(""); ?></title>
<meta name="description" content="<?php bloginfo("description"); ?>">
<meta charset="<?php bloginfo("charset"); ?>">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- META FOR SHARING -->
<meta property="og:title" content="<?php wp_title(""); ?><?php if(wp_title("", false)) { echo " : "; } ?><?php bloginfo("name"); ?>" />
<meta property="og:description" content="<?php bloginfo("description"); ?>" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<?php echo get_site_url(); ?>" />
<meta property="og:site_name" content="<?php echo str_replace(array( "http://", "https://" ), "", get_site_url()); ?>" />
<?php
$image_for_sharing = get_field("image_for_sharing", "option");
if ($image_for_sharing) : ?>
<meta property="og:image" content="<?php echo $image_for_sharing; ?>" />
<?php endif; ?>
<!-- META FOR SHARING END -->
<!-- THEME PATH -->
<script type="text/javascript">
var pathInfo = {
base: "<?php echo get_template_directory_uri(); ?>/",
css: "css/",
js: "js/"
}
</script>
<!-- THEME PATH END -->
<?php
$additional_scripts = get_field("additional_scripts", "option");
if ($additional_scripts) :
?>
<script type="text/javascript">
<?php echo $additional_scripts; ?>
</script>
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div class="page-wrapper">
<!-- HEADER -->
<header class="header">
<div class="container">
<a href="<?php echo esc_url( home_url( "/" ) ); ?>">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/img/x-project-wp.jpg" alt="<?php bloginfo("name"); ?>">
</a>
</div>
</header>
<!-- HEADER END -->
<!-- CONTENT -->
<main class="main">