Created
August 16, 2020 11:07
-
-
Save isabellachen/275006f228f32659bea73931873969b6 to your computer and use it in GitHub Desktop.
Adding Depth to WordPress Sub Menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* In header.php | |
*/ | |
<nav id="site-navigation" class="main-navigation"> | |
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e('Primary Menu', 'custom_walker'); ?></button> | |
<?php | |
wp_nav_menu( | |
array( | |
'theme_location' => 'menu-1', | |
'menu_id' => 'primary-menu', | |
'walker' => new Primary_Walker_Nav_Menu() | |
) | |
); | |
?> | |
</nav><!-- #site-navigation --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment