[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  <?php
   2  /**
   3   * Displays the site header.
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Twenty_One
   7   * @since Twenty Twenty-One 1.0
   8   */
   9  
  10  $wrapper_classes  = 'site-header';
  11  $wrapper_classes .= has_custom_logo() ? ' has-logo' : '';
  12  $wrapper_classes .= ( true === get_theme_mod( 'display_title_and_tagline', true ) ) ? ' has-title-and-tagline' : '';
  13  $wrapper_classes .= has_nav_menu( 'primary' ) ? ' has-menu' : '';
  14  ?>
  15  
  16  <header id="masthead" class="<?php echo esc_attr( $wrapper_classes ); ?>">
  17  
  18      <?php get_template_part( 'template-parts/header/site-branding' ); ?>
  19      <?php get_template_part( 'template-parts/header/site-nav' ); ?>
  20  
  21  </header><!-- #masthead -->


Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1