Utilising header for second menu


Is there a way to use the header area for a second menu?

Thank you

There is really no easy way to get this done if you are not familiar with some basic WordPress development.

First of all you need to register a new menu via functions.php Here is an example how I have default menu registered:

register_nav_menu( 'primary', __( 'Primary Menu', 'travelify' ) );

Then you will have to call for this menu inside header. This really depends on how you want it to appear and how you want it to be styled. For more information on WP menus you ca read official documentation:

Thank you Aigars!

This could possibly be a bit beyond my capabilities, but perhaps if I can explain in a little more detail what I’m aiming to achieve, you may be able to give me further direction.

I have linked my site to Woocommerce, so the plan was to have a main navigation in the usual Travelify place, with Home, About, Products, and so on and then above the main slider image on the right-hand side have ‘view cart’ and ‘checkout’. I think people are used to looking in this place for those items and wanted to replicate that somehow.

Actually you don’t need to register any menu or anything. You just need to add cart icon or some shortcode from WooCommerce that would do it for your.

Recently I explained a similar concept on how to add cart icon on the menu bar.


Great! So that’s what I need to do, but a little uncertain about where the code goes. I have opened the header-extensions.php and can find the div “container clearfix” but at line 245 is in the middle of function travelify_favicon()… I feel I’m not quite in the right place!

Favicon related code is between line 97 and line 127 and that’s not where you should place your code.

Look for this code instead:

echo '</div><!-- .container -->
</nav><!-- #main-nav -->';

Okay, I’ve found that…

else {

			echo '<nav id="main-nav" class="clearfix">

					<div class="container clearfix">';

				wp_page_menu( array( 'menu_class'  => 'root' ) );

			echo '</div> <!-- .container --> 

					</nav><!-- #main-nav -->';


Whereabouts should I add
<div class="card-icon">[woocommerce_cart]</div>

Hello, are you able to assist me further. I’ve tried all sorts, but so far no luck!

Didn’t notice your response at first, sorry about that.

You can add and execute WordPress/WooCommerce shortcode in php like this.

echo do_shortcode('[woocommerce_cart]');

right after where the menu, while div is menu div is not closed.

wp_nav_menu( $args );

However, this is an actual shopping cart shortcode that show the entire cart page and this won’t be the proper way to use it in the menu. Check if there is no other alternative for some widgets style cart or something like that you could add there. I am really not that familiar with WooCommerce.

Okay, thank you!