[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  <?php
   2  /**
   3   * The template for displaying the header
   4   *
   5   * Displays all of the head element and everything up until the "site-content" div.
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Fifteen
   9   * @since Twenty Fifteen 1.0
  10   */
  11  ?><!DOCTYPE html>
  12  <html <?php language_attributes(); ?> class="no-js">
  13  <head>
  14      <meta charset="<?php bloginfo( 'charset' ); ?>">
  15      <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16      <link rel="profile" href="https://gmpg.org/xfn/11">
  17      <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
  18      <?php wp_head(); ?>
  19  </head>
  20  
  21  <body <?php body_class(); ?>>
  22  <?php wp_body_open(); ?>
  23  <div id="page" class="hfeed site">
  24      <a class="skip-link screen-reader-text" href="#content">
  25          <?php
  26          /* translators: Hidden accessibility text. */
  27          _e( 'Skip to content', 'twentyfifteen' );
  28          ?>
  29      </a>
  30  
  31      <div id="sidebar" class="sidebar">
  32          <header id="masthead" class="site-header">
  33              <div class="site-branding">
  34                  <?php
  35                  twentyfifteen_the_custom_logo();
  36                  $is_front  = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
  37                  $site_name = get_bloginfo( 'name', 'display' );
  38  
  39                  if ( $site_name && is_front_page() && is_home() ) :
  40                      ?>
  41                      <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
  42                  <?php elseif ( $site_name ) : ?>
  43                      <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></p>
  44                      <?php
  45                  endif;
  46  
  47                  $description = get_bloginfo( 'description', 'display' );
  48                  if ( $description || is_customize_preview() ) :
  49                      ?>
  50                      <p class="site-description"><?php echo $description; ?></p>
  51                  <?php endif; ?>
  52  
  53                  <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
  54              </div><!-- .site-branding -->
  55          </header><!-- .site-header -->
  56  
  57          <?php get_sidebar(); ?>
  58      </div><!-- .sidebar -->
  59  
  60      <div id="content" class="site-content">


Generated : Tue Aug 19 08:20:01 2025 Cross-referenced by PHPXref