Storefront (WooThemes)

Knowledgebase Docs » UberMenu 3
USEFUL? 13
UberMenu 3

Due to residual styling, Storefront breaks UberMenu when installed. To prevent the theme from interfering, we can use Manual Integration. Since Storefront’s menu function is pluggable, the simplest way to do this is to just paste this PHP in your child theme’s functions.php

function storefront_primary_navigation() {
	?>

	<?php if( function_exists( 'ubermenu' ) ): ?>
		<?php ubermenu( 'main' , array( 'theme_location' => 'primary' ) ); ?>
	<?php else: ?>
		<nav id="site-navigation" class="main-navigation" role="navigation">
		<button class="menu-toggle"><?php apply_filters( 'storefront_menu_toggle_text', $content = _e( 'Primary Menu', 'storefront' ) ); ?></button>
			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
		</nav><!-- #site-navigation -->
	<?php endif; ?>

	<?php
}