|
1 <?php |
|
2 /** |
|
3 * The header for our theme |
|
4 * |
|
5 * This is the template that displays all of the <head> section and everything up until <div id="content"> |
|
6 * |
|
7 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials |
|
8 * |
|
9 * @package WordPress |
|
10 * @subpackage Twenty_Seventeen |
|
11 * @since 1.0 |
|
12 * @version 1.0 |
|
13 */ |
|
14 |
|
15 ?><!DOCTYPE html> |
|
16 <html <?php language_attributes(); ?> class="no-js no-svg"> |
|
17 <head> |
|
18 <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
19 <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
20 <link rel="profile" href="http://gmpg.org/xfn/11"> |
|
21 |
|
22 <?php wp_head(); ?> |
|
23 </head> |
|
24 |
|
25 <body <?php body_class(); ?>> |
|
26 <div id="page" class="site"> |
|
27 <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a> |
|
28 |
|
29 <header id="masthead" class="site-header" role="banner"> |
|
30 |
|
31 <?php get_template_part( 'template-parts/header/header', 'image' ); ?> |
|
32 |
|
33 <?php if ( has_nav_menu( 'top' ) ) : ?> |
|
34 <div class="navigation-top"> |
|
35 <div class="wrap"> |
|
36 <?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?> |
|
37 </div><!-- .wrap --> |
|
38 </div><!-- .navigation-top --> |
|
39 <?php endif; ?> |
|
40 |
|
41 </header><!-- #masthead --> |
|
42 |
|
43 <?php |
|
44 |
|
45 /* |
|
46 * If a regular post or page, and not the front page, show the featured image. |
|
47 * Using get_queried_object_id() here since the $post global may not be set before a call to the_post(). |
|
48 */ |
|
49 if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) : |
|
50 echo '<div class="single-featured-image-header">'; |
|
51 echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' ); |
|
52 echo '</div><!-- .single-featured-image-header -->'; |
|
53 endif; |
|
54 ?> |
|
55 |
|
56 <div class="site-content-contain"> |
|
57 <div id="content" class="site-content"> |