Currently using this code in my Wordpress menu system to load the menu.
<div id='navbar' class='collapse navbar-collapse'>
<?php if ( function_exists('max_mega_menu_is_enabled') && max_mega_menu_is_enabled('primary') ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary') ); ?>
<?php else: ?>
<?php
if ( has_nav_menu( 'primary' ) ) :
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'main-navigation',
'walker' => new Aria_Walker_Nav_Menu(),
'items_wrap' => '<ul id="%1$s" class="%2$s" role="menubar">%3$s</ul>',
) );
endif;
?>
<?php endif; ?>
</div>
I am also using a plugin that allows me to switch out content based on location of the user using a shortcode.
Here is the short code
<?php echo do_shortcode("[CBC show='y' country='us'] Content to switch out goes here [/CBC]
I've also created a menu called 'services' aside from the 'primary' one. I've tried to implement the do_shortcode method to attempt to switch out the lines that have 'primary' for 'services' but keep getting errors.
I'm not sure if I'm having syntax errors or if it isn't possible.
I've successfully used the do_shortcode method in our footer like this to swap out sticky mobile buttons and it works:
<?php echo do_shortcode("[CBC show='y' country='us'] <a class='call-now' id='track-calls' href='tel:555-555-5555'><i class='fa fa-mobile'></i> CALL US</a>[/CBC]"); ?>
<?php echo do_shortcode("[CBC show='y' country='us'] <a class='schedule-now' id='book-now' href='http://example.com'><i class='fa fa-calendar'></i> BOOK NOW</a>[/CBC]"); ?>
<?php echo do_shortcode("[CBC show='y' country='tt'] <a class='call-now' id='track-calls' href='tel:555-555-1234'><i class='fa fa-mobile'></i> CALL US</a>[/CBC]"); ?>
<?php echo do_shortcode("[CBC show='y' country='tt'] <a class='schedule-now' id='book-now' href='http://example.com'><i class='fa fa-calendar'></i> BOOK NOW</a>[/CBC]"); ?>