[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentynineteen/ -> 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_Nineteen
  11   * @since Twenty Nineteen 1.0
  12   */
  13  ?><!doctype html>
  14  <html <?php language_attributes(); ?>>
  15  <head>
  16      <meta charset="<?php bloginfo( 'charset' ); ?>" />
  17      <meta name="viewport" content="width=device-width, initial-scale=1" />
  18      <link rel="profile" href="https://gmpg.org/xfn/11" />
  19      <?php wp_head(); ?>
  20  </head>
  21  
  22  <body <?php body_class(); ?>>
  23  <?php wp_body_open(); ?>
  24  <div id="page" class="site">
  25      <a class="skip-link screen-reader-text" href="#content">
  26          <?php
  27          /* translators: Hidden accessibility text. */
  28          _e( 'Skip to content', 'twentynineteen' );
  29          ?>
  30      </a>
  31  
  32          <header id="masthead" class="<?php echo is_singular() && twentynineteen_can_show_post_thumbnail() ? 'site-header featured-image' : 'site-header'; ?>">
  33  
  34              <div class="site-branding-container">
  35                  <?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
  36              </div><!-- .site-branding-container -->
  37  
  38              <?php if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) : ?>
  39                  <div class="site-featured-image">
  40                      <?php
  41                          twentynineteen_post_thumbnail();
  42                          the_post();
  43                          $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null;
  44  
  45                          $classes = 'entry-header';
  46                      if ( ! empty( $discussion ) && absint( $discussion->responses ) > 0 ) {
  47                          $classes = 'entry-header has-discussion';
  48                      }
  49                      ?>
  50                      <div class="<?php echo $classes; ?>">
  51                          <?php get_template_part( 'template-parts/header/entry', 'header' ); ?>
  52                      </div><!-- .entry-header -->
  53                      <?php rewind_posts(); ?>
  54                  </div>
  55              <?php endif; ?>
  56          </header><!-- #masthead -->
  57  
  58      <div id="content" class="site-content">


Generated : Fri Apr 19 08:20:01 2024 Cross-referenced by PHPXref