Warp Framework (YooTheme)

Knowledgebase Docs » UberMenu 2 » Theme Integration
USEFUL? 0

If you are using UberMenu 3, please see the UberMenu 3 Warp integration guide

YooTheme doesn’t use the WordPress standard wp_nav_menu function, so it doesn’t meet the UberMenu requirements. This means you’ll need to manually integrate UberMenu into the theme with UberMenu Easy Integration. Here’s what you’ll need to do:

1. Enable UberMenu Easy Integration

Follow Part 1 and Part 3 only of the Easy Integration guide (skip part 2).

2. Integrate UberMenu into YooTheme

Warp v7

Open `layouts/theme.php` and find this code:

	<?php if ($this['widgets']->count('logo + headerbar + menu + search')) : ?>
		<div class="tm-block tm-headerbar uk-clearfix <?php echo $slant_classes['headerbar']; ?>">
			<div class="uk-container uk-container-center">

				<?php if ($this['widgets']->count('logo')) : ?>
				<a class="uk-navbar-brand" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo'); ?></a>
				<?php endif; ?>

				<?php echo $this['widgets']->render('headerbar'); ?>

				<?php if ($this['widgets']->count('search')) : ?>
				<div class="uk-navbar-flip">
					<div class="uk-navbar-content uk-visible-large"><?php echo $this['widgets']->render('search'); ?></div>
				</div>
				<?php endif; ?>

				<?php if ($this['widgets']->count('menu')) : ?>
				<div class="uk-navbar-flip uk-hidden-small">
					<?php echo $this['widgets']->render('menu'); ?>
				</div>
				<?php endif; ?>

				<?php if ($this['widgets']->count('offcanvas')) : ?>
				<a href="#offcanvas" class="uk-navbar-toggle uk-navbar-flip uk-visible-small" data-uk-offcanvas></a>
				<?php endif; ?>

				<?php if ($this['widgets']->count('logo-small')) : ?>
				<div class="uk-navbar-content uk-navbar-center uk-visible-small"><a class="tm-logo-small" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo-small'); ?></a></div>
				<?php endif; ?>

			</div>
			<div class="tm-slant-block-bottom"></div>
		</div>
		<?php endif; ?>

Replace it with this code:

	<?php if ($this['widgets']->count('logo + headerbar + menu + search')) : ?>
		<div class="tm-block tm-headerbar uk-clearfix <?php echo $slant_classes['headerbar']; ?>">
			<div class="uk-container uk-container-center">

				<?php if ($this['widgets']->count('logo')) : ?>
				<a class="uk-navbar-brand" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo'); ?></a>
				<?php endif; ?>

				<?php echo $this['widgets']->render('headerbar'); ?>

				<?php if( function_exists( 'uberMenu_direct' ) ) uberMenu_direct( 'ubermenu' ); ?>

				<?php if ($this['widgets']->count('logo-small')) : ?>
				<div class="uk-navbar-content uk-navbar-center uk-visible-small"><a class="tm-logo-small" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo-small'); ?></a></div>
				<?php endif; ?>

			</div>
			<div class="tm-slant-block-bottom"></div>
		</div>
		<?php endif; ?>

Please contact YooThemes if you need further assistance. Since this framework doesn’t follow WordPress best practices, it can’t be supported by UberMenu.

Older Warp

If you’re using an older version of Warp, the code to replace is different.

Open layouts/template.php in your text editor. If you want to remove the original menu, delete this code:

<?php if ($this['modules']->count('menu + search')) : ?>
<div id="menubar" class="clearfix">
				
	<?php if ($this['modules']->count('menu')) : ?>
	<nav id="menu"><?php echo $this['modules']->render('menu'); ?></nav>
	<?php endif; ?>

	<?php if ($this['modules']->count('search')) : ?>
	<div id="search"><?php echo $this['modules']->render('search'); ?></div>
	<?php endif; ?>
				
</div>
<?php endif; ?>

To add UberMenu, add this code:

<?php if( function_exists( 'uberMenu_direct' ) ) uberMenu_direct( 'ubermenu' ); ?>

Adapted from this tutorial. Please note, since this theme does not follow standard WordPress best practices, I do not know if this is a best-practice for customizing a YooTheme theme.