• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / template-parts/navigation/navigation-top.php


Lines:

1 to 35 of 35
<?php

/**
 * Displays top navigation
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since Twenty Seventeen 1.0
 * @version 1.2
 */

?>
<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Top Menu', 'twentyseventeen' ); ?>">
	<button class="menu-toggle" aria-controls="top-menu" aria-expanded="false">
		<?php
    echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) );
    echo twentyseventeen_get_svg( array( 'icon' => 'close' ) );
    _e( 'Menu', 'twentyseventeen' );
    ?>
	</button>

	<?php
  wp_nav_menu(
    array(
      'theme_location' => 'top',
      'menu_id'        => 'top-menu',
    )
  );
  ?>

	<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?>
		<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>
	<?php endif; ?>
</nav><!-- #site-navigation -->
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 2 of 2
      • twentyseventeen_get_svg() – Return SVG markup.
      • twentyseventeen_is_frontpage() – Checks to see if we’re on the front page or not.

      Call hooks

      File name: template-parts/navigation/navigation-top.php
      Plugin ref: Twenty Seventeen
      Version: 3.1
      Deprecated?: No
      API Letters: N,P,T

      Published: 8th April 2020 | Last updated: 26th January 2022

      Primary Sidebar

      Information

      File name: template-parts/navigation/navigation-top.php
      Plugin ref: Twenty Seventeen
      Version: 3.1
      Deprecated?: No
      API Letters: N,P,T

      template-parts/navigation

      Footer

      WordPress a2z
      WordPress a2z
      WordPress Dynamic API Reference
      WordPress 6.1.1. PHP: 8.0.28
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  wp-a2z.org
      © Copyright WordPress a2z 2014-2023. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites