[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentyseventeen/template-parts/navigation/ -> navigation-top.php (source)

   1  <?php
   2  /**
   3   * Displays top navigation
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Seventeen
   7   * @since Twenty Seventeen 1.0
   8   * @version 1.2
   9   */
  10  
  11  ?>
  12  <nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Top Menu', 'twentyseventeen' ); ?>">
  13      <button class="menu-toggle" aria-controls="top-menu" aria-expanded="false">
  14          <?php
  15          echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) );
  16          echo twentyseventeen_get_svg( array( 'icon' => 'close' ) );
  17          _e( 'Menu', 'twentyseventeen' );
  18          ?>
  19      </button>
  20  
  21      <?php
  22      wp_nav_menu(
  23          array(
  24              'theme_location' => 'top',
  25              'menu_id'        => 'top-menu',
  26          )
  27      );
  28      ?>
  29  
  30      <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?>
  31          <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text">
  32              <?php
  33              /* translators: Hidden accessibility text. */
  34              _e( 'Scroll down to content', 'twentyseventeen' );
  35              ?>
  36          </span></a>
  37      <?php endif; ?>
  38  </nav><!-- #site-navigation -->


Generated : Thu Apr 18 08:20:02 2024 Cross-referenced by PHPXref