-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header-festival.php
59 lines (53 loc) · 2.18 KB
/
header-festival.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
<?php
/**
* The header for our MinnPost Festival theme
*
* This is the festival template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package MinnPost Largo
*/
?><!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head <?php do_action( 'add_head_attributes' ); ?>>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>
</head>
<?php
$event_logo_info = minnpost_largo_get_event_website_logo_info( 'festival' );
$event_year = minnpost_largo_get_event_year( 'festival', get_the_date( 'Y' ) );
$classes[] = 'festival-' . $event_year;
if ( isset( $event_logo_info['is_current_url'] ) && true === $event_logo_info['is_current_url'] ) {
$classes[] = 'festival-landing-page';
}
?>
<body <?php body_class( $classes ); ?>>
<?php wp_body_open(); ?>
<header id="masthead" class="o-header o-header-festival">
<div class="o-wrapper o-wrapper-site-navigation">
<?php get_template_part( 'template-parts/logo', 'festival', $event_logo_info ); ?>
<nav id="navigation-primary" class="m-main-navigation m-main-navigation-festival">
<?php
wp_nav_menu(
array(
'theme_location' => 'festival',
'menu_id' => 'festival-menu',
'container' => false,
'walker' => new Minnpost_Walker_Nav_Menu(),
'item_classes' => 'values',
'items_wrap' => '<ul id="%1$s" class="m-menu m-menu-%1$s">%3$s</ul>',
)
);
?>
</nav><!-- #navigation-primary -->
</div>
<?php if ( false === $event_logo_info['is_current_url'] && ! is_singular( array( 'tribe_events', 'tribe_ext_speaker' ) ) ) : ?>
<div class="o-wrapper o-wrapper-festival-page-title">
<?php the_title( '<h1 class="a-page-title">', '</h1>' ); ?>
</div>
<?php endif; ?>
</header><!-- #masthead -->
<?php do_action( 'wp_message_inserter', 'header' ); ?>
<div id="content" class="o-wrapper o-wrapper-content o-wrapper-content-festival<?php echo ( false !== get_query_var( 'grid', false ) ) ? ' o-wrapper-grid-overlay' : ''; ?>">