[ Index ]

PHP Cross Reference of WordPress

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"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
  32      <?php endif; ?>
  33  </nav><!-- #site-navigation -->


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