-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
112 lines (88 loc) · 3.49 KB
/
Copy pathheader.php
File metadata and controls
112 lines (88 loc) · 3.49 KB
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
<?php
/**
* The Header for our theme.
*
* Displays all the <head> section and everything up till <div id="content">
*
* @package upTown
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content">
<?php
/* translators: Hidden accessibility text. */
esc_html_e( 'Skip to content', 'uptown' );
?>
</a>
<?php do_action( 'before' ); ?>
<div id="masthead-wrap" class="site-header-wrap wrap">
<header id="masthead" class="site-header" role="banner">
<?php
/**
* We check individual logo settings here. If there is an alternative
* logo and the option of the individual page is activated, we use it.
* If not the regular logo is used.
*/
$logo = '';
if ( uptown_is_playground_default_logo_enabled() ) {
$logo = apply_filters( 'wpsight_uptown_logo', uptown_get_default_logo_url() );
}
// We get the custom logo, if available.
$custom_logo_id = get_theme_mod( 'custom_logo' );
if ( $custom_logo_id ) {
$arr = wp_get_attachment_image_src( $custom_logo_id , 'full' );
$logo = apply_filters( 'wpsight_uptown_logo', $arr[0] );
}
if ( ! empty( $logo ) ) {
?>
<div class="site-branding">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="<?php echo esc_url( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" /></a>
</div><!-- #site-branding -->
<?php
} elseif ( ! empty( get_bloginfo( 'name' ) ) ) {
?>
<div class="site-branding">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>
</div><!-- #site-branding -->
<?php
}
$show_description = get_theme_mod( 'deactivate_tagline' );
if ( empty( $show_description ) && ! empty( get_bloginfo( 'description' ) ) ) {
$description_tag = is_front_page() ? 'p' : 'div';
?>
<<?php echo esc_html( $description_tag ); ?> class="site-description"><?php echo esc_html( get_bloginfo( 'description' ) ); ?></<?php echo esc_html( $description_tag ); ?>>
<?php
}
$header_right = get_option( 'header-right', __( 'Call us today - 1 (800) 234 567', 'uptown' ) );
if( ! empty( $header_right ) ) { ?>
<div class="site-header-right">
<?php echo $header_right; ?>
</div>
<?php } ?>
</header><!-- #masthead -->
</div><!-- #masthead-wrap -->
<?php if (has_nav_menu('primary')) : ?>
<div class="menu-container site-navigation-wrap">
<button class="menu-button" aria-controls="site-navigation" aria-expanded="false">
<?php esc_html_e( 'Menu', 'uptown' ); ?>
</button>
<div id="site-header-menu" class="site-header-menu site-navigation-wrap">
<nav id="site-navigation" class="main-navigation clear" role="navigation" aria-label="<?php _e( 'Primary menu', 'uptown' ); ?>">
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 3, ) ); ?>
</nav><!-- #site-navigation -->
</div>
</div><!-- #site-navigation-wrap -->
<?php endif; ?>
<?php get_template_part( 'content', 'subheader' ); ?>
<div id="content-wrap" class="site-content-wrap">
<div id="content" class="site-content">