Added menu with bootstrap navwalker
This commit is contained in:
parent
c5384d47c2
commit
b59ef37595
|
@ -96,6 +96,11 @@ function tainacan_change_logo_class( $html ) {
|
|||
add_filter( 'get_custom_logo', 'tainacan_change_logo_class' );
|
||||
|
||||
require_once get_template_directory() . '/vendor/class-wp-bootstrap-navwalker.php';
|
||||
|
||||
register_nav_menus( array(
|
||||
'navMenubelowHeader' => __( 'Nav Menu Below Header', 'tainacan-theme' ),
|
||||
) );
|
||||
|
||||
require get_template_directory() . '/functions/enqueues.php';
|
||||
require get_template_directory() . '/functions/customize.php';
|
||||
require get_template_directory() . '/functions/pagination.php';
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<a class="dropdown-item" href="#">Sair</a>
|
||||
</div>
|
||||
</div>
|
||||
<button class="navbar-toggler text-heavy-metal border-0 px-0 pt-2" type="button" data-toggle="collapse" data-target="#menuTp" aria-controls="menuTp" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<button class="navbar-toggler text-heavy-metal border-0 px-0 pt-2 ml-auto" type="button" data-toggle="collapse" data-target="#menuTp" aria-controls="menuTp" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse mt-sm-1 mr-sm-3" id="menuTp">
|
||||
|
|
|
@ -1,5 +1,26 @@
|
|||
<?php
|
||||
//Header with banner and menu
|
||||
get_header('banner');?>
|
||||
get_header('banner'); ?>
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white px-1" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#"></a>
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<button class="navbar-toggler text-heavy-metal border-0 px-2 pt-2" type="button" data-toggle="collapse" data-target="#menubelowHeader" aria-controls="menubelowHeader" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'theme_location' => 'navMenubelowHeader',
|
||||
'depth' => 1, // 1 = with dropdowns, 0 = no dropdowns.
|
||||
'container' => 'div',
|
||||
'container_class' => 'collapse navbar-collapse',
|
||||
'container_id' => 'menubelowHeader',
|
||||
'menu_class' => 'navbar-nav mr-auto',
|
||||
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
|
||||
'walker' => new WP_Bootstrap_Navwalker()
|
||||
) );
|
||||
?>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container-fluid mt-5">
|
Loading…
Reference in New Issue