Quadrum produces some residual styling, so you’ll want to use Manual Integration to move the menu outside of the theme’s #main-menu
class.
Quadrum’s menu isn’t directly inside the header.php
– instead it is in the includes/top.php
file.
Ideally, you will make this edit in a child theme, but the same edit can work in the parent theme as well.
First, create a child theme (or install one provided by the theme author)
Next, create an /includes
directory within the child theme. Copy the includes/top.php
file from the parent them into the child theme’s includes
directory.
Open the child theme’s top.php
file and find this code around line 153:
<div id="main-menu"<?php if($menuLayout=="on") { ?> class="thisisfixed"<?php } ?>> <!-- BEGIN .wrapper --> <div class="wrapper"> <?php wp_reset_query(); if ( function_exists( 'register_nav_menus' )) { $walker = new OT_Walker; if(get_option(THEME_NAME."_menu_effect")=="on") { $class = " transition-active"; } else { $class = false; } $args = array( 'container' => '', 'theme_location' => 'main-menu', 'items_wrap' => '<ul class="%2$s ot-menu-add" rel="'.__("Main Menu", THEME_NAME).'">%3$s</ul>', 'depth' => 3, "echo" => false, 'walker' => $walker ); if(has_nav_menu('main-menu')) { echo wp_nav_menu($args); } else { echo "<ul rel=\"".__("Main Menu", THEME_NAME)."\"><li class=\"navi-none ot-menu-add\"><a href=\"".admin_url("nav-menus.php") ."\">Please set up ".THEME_FULL_NAME." menu!</a></li></ul>"; } } ?> <!-- END .wrapper --> </div> </div>
Then wrap it in an if/else statement so that UberMenu is used instead when it is present. Add this code before:
<?php if( function_exists( 'ubermenu' ) ): ?> <?php ubermenu( 'main' , array( 'theme_location' => 'main-menu' ) ); ?> <?php else: ?>
and this code after:
<?php endif; ?>
Here’s the final result:
<?php if( function_exists( 'ubermenu' ) ): ?> <?php ubermenu( 'main' , array( 'theme_location' => 'main-menu' ) ); ?> <?php else: ?> <div id="main-menu"<?php if($menuLayout=="on") { ?> class="thisisfixed"<?php } ?>> <!-- BEGIN .wrapper --> <div class="wrapper"> <?php wp_reset_query(); if ( function_exists( 'register_nav_menus' )) { $walker = new OT_Walker; if(get_option(THEME_NAME."_menu_effect")=="on") { $class = " transition-active"; } else { $class = false; } $args = array( 'container' => '', 'theme_location' => 'main-menu', 'items_wrap' => '<ul class="%2$s ot-menu-add" rel="'.__("Main Menu", THEME_NAME).'">%3$s</ul>', 'depth' => 3, "echo" => false, 'walker' => $walker ); if(has_nav_menu('main-menu')) { echo wp_nav_menu($args); } else { echo "<ul rel=\"".__("Main Menu", THEME_NAME)."\"><li class=\"navi-none ot-menu-add\"><a href=\"".admin_url("nav-menus.php") ."\">Please set up ".THEME_FULL_NAME." menu!</a></li></ul>"; } } ?> <!-- END .wrapper --> </div> </div> <?php endif; ?>