Snippets: Add Secondary Custom Menu Under Header

function add_custom_menu_above_main_content() { ?>

	<div class="my-nav-wrapper clr">

		<div class="container clr"> <!-- .center the navbar content -->

			<?php
			// Solution 1 add the navbar shortcode
			echo do_shortcode( '[vcex_navbar menu="60"]' ); // change the menu ID

			// Solution 2 using WP menu see
			// @ https://codex.wordpress.org/Function_Reference/wp_nav_menu for args
			$args = array();
			wp_nav_menu( $args );

			// Solution 3 use a menu plugin such as uberMenu
			do_shortcode( '[menu_shortcode_here]' ); ?>

		</div>

	</div>

<?php }
add_action( 'wpex_hook_header_after', 'add_custom_menu_above_main_content' );

Snippet Type: PHP

Posted Under: Header

All PHP snippets should be added via a child theme's functions.php file.