forked from AthelasPeru/oniros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
44 lines (37 loc) · 1.93 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
<!doctype html>
<!--[if lt IE 7]><html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html <?php language_attributes(); ?> class="no-js lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?> class="no-js"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title><?php
// Hack to solve title not apearing on index templates
// http://stackoverflow.com/questions/9055009/wordpress-wp-title-blank-on-index-page
bloginfo('name'); ?> | <?php is_front_page() ? bloginfo('description') : wp_title('');?>
</title>
<?php get_template_part( "includes/templates/icons" ); ?>
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
<?php wp_head(); ?>
<?php if(!WP_DEBUG):
// Activate Google analytics only if in production
?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXX-X', 'auto');
ga('send', 'pageview');
</script>
<?php endif; ?>
</head>
<body <?php body_class(); ?> >
<?php if ( get_theme_mod( 'oniros_logo' ) ) : ?>
<a href='<?php echo esc_url( home_url( '/' ) ); ?>' rel='home'>
<img src='<?php echo esc_url( get_theme_mod( 'oniros_logo' ) ); ?>' alt='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>'>
</a>
<?php endif; ?>