[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentyseventeen/template-parts/header/ -> site-branding.php (source)

   1  <?php
   2  /**
   3   * Displays header site branding
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Seventeen
   7   * @since Twenty Seventeen 1.0
   8   * @version 1.0
   9   */
  10  
  11  ?>
  12  <div class="site-branding">
  13      <div class="wrap">
  14  
  15          <?php the_custom_logo(); ?>
  16  
  17          <div class="site-branding-text">
  18              <?php
  19              $is_front  = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
  20              $site_name = get_bloginfo( 'name', 'display' );
  21  
  22              if ( $site_name && is_front_page() ) :
  23                  ?>
  24                  <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>
  25              <?php elseif ( $site_name ) : ?>
  26                  <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>
  27                  <?php
  28              endif;
  29  
  30              $description = get_bloginfo( 'description', 'display' );
  31  
  32              if ( $description || is_customize_preview() ) :
  33                  ?>
  34                  <p class="site-description"><?php echo $description; ?></p>
  35              <?php endif; ?>
  36          </div><!-- .site-branding-text -->
  37  
  38          <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?>
  39          <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text">
  40              <?php
  41              /* translators: Hidden accessibility text. */
  42              _e( 'Scroll down to content', 'twentyseventeen' );
  43              ?>
  44          </span></a>
  45      <?php endif; ?>
  46  
  47      </div><!-- .wrap -->
  48  </div><!-- .site-branding -->


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