[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyseventeen/ -> header.php (source)

   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  <?php wp_body_open(); ?>
  27  <div id="page" class="site">
  28      <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
  29  
  30      <header id="masthead" class="site-header" role="banner">
  31  
  32          <?php get_template_part( 'template-parts/header/header', 'image' ); ?>
  33  
  34          <?php if ( has_nav_menu( 'top' ) ) : ?>
  35              <div class="navigation-top">
  36                  <div class="wrap">
  37                      <?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
  38                  </div><!-- .wrap -->
  39              </div><!-- .navigation-top -->
  40          <?php endif; ?>
  41  
  42      </header><!-- #masthead -->
  43  
  44      <?php
  45  
  46      /*
  47       * If a regular post or page, and not the front page, show the featured image.
  48       * Using get_queried_object_id() here since the $post global may not be set before a call to the_post().
  49       */
  50      if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) :
  51          echo '<div class="single-featured-image-header">';
  52          echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );
  53          echo '</div><!-- .single-featured-image-header -->';
  54      endif;
  55      ?>
  56  
  57      <div class="site-content-contain">
  58          <div id="content" class="site-content">


Generated: Wed Oct 23 01:00:03 2019 Cross-referenced by PHPXref 0.7.1