Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function clean_commerce_add_primary_navigation() {
?>
<div id="main-nav" class="clear-fix">
<div class="container">
<nav id="site-navigation" class="main-navigation" role="navigation">
<div class="wrap-menu-content">
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'fallback_cb' => 'clean_commerce_primary_navigation_fallback',
) );
?>
</div><!-- .menu-content -->
</nav><!-- #site-navigation -->
<?php $search_in_header = clean_commerce_get_option( 'search_in_header' ); ?>
<?php if ( true === $search_in_header ) : ?>
<div class="header-search-box">
<a href="#" class="search-icon"><i class="fa fa-search"></i></a>
<div class="search-box-wrap">
<?php
if ( clean_commerce_is_woocommerce_active() ) :
get_product_search_form();
else :
get_search_form();
endif;
?>
</div><!-- .search-box-wrap -->
</div><!-- .header-search-box -->
<?php endif; ?>
</div> <!-- .container -->
</div> <!-- #main-nav -->
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment