Created
October 11, 2019 13:15
-
-
Save renemorozowich/e46e93b2b8eab4e87dcd97468f1f79fe to your computer and use it in GitHub Desktop.
Add a bottom menu (after header) to an Astra child theme
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
/** | |
* Add additional menu | |
*/ | |
function register_additional_menus() { | |
register_nav_menu( 'bottom-menu', __( 'Bottom Menu' ) ); | |
} | |
add_action( 'init', 'register_additional_menus' ); | |
/** | |
* Add scripts to astra_header_after | |
*/ | |
function add_script_after_header() { | |
?> | |
<div class="bottom-header-bar"> | |
<div class="ast-container"> | |
<?php wp_nav_menu( array( 'theme_location' => 'bottom-menu' ) ); ?> | |
</div> | |
</div> | |
<?php | |
} | |
add_action( 'astra_header_after', 'add_script_after_header' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment