?> </a></h3> <div id="navigation" class=""> <?php woo_nav_inside(); ?> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { wp_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fr', 'theme_location' => 'primary-menu')); } else { ?> <ul id="main-nav" class="nav fr"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output('name=Woo Menu 1'); } } else { ?> <?php if (is_page()) { $highlight = 'page_item'; } else { $highlight = 'page_item current_page_item'; } ?> <li class="<?php echo esc_attr($highlight); ?> "><a href="<?php
</div><!--header--> <div id="nav"> <div class="container_12"> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { wp_nav_menu(array('depth' => 1, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'navigation', 'theme_location' => 'primary-menu')); } else { ?> <ul id="navigation"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output('desc=1'); } } else { ?> <li><a <?php if (is_home()) { ?> class="current_page_item"<?php } ?> href="<?php bloginfo('url'); ?> "> <?php _e('Home', woothemes);
function widget($args, $instance) { $navmenu = $instance['navmenu']; $navtitle = $instance['navtitle']; $navdeveloper = strtolower($instance['navdeveloper']); if (isset($instance['navdiv'])) { $navdiv = strtolower($instance['navdiv']); } else { $navdiv = 'no'; } if (isset($instance['navul'])) { $navul = strtolower($instance['navul']); } else { $navul = 'no'; } if (isset($instance['navwidgetdescription'])) { $navwidgetdescription = strtolower($instance['navwidgetdescription']); } else { $navwidgetdescription = '2'; } $menuexists = false; global $wpdb; //GET menu name if ($navmenu > 0) { $table_name_menus = $wpdb->prefix . "woo_custom_nav_menus"; $woo_result = $wpdb->get_results("SELECT menu_name FROM " . $table_name_menus . " WHERE id='" . $navmenu . "'"); $woo_custom_nav_menu_name = $woo_result[0]->menu_name; $menuexists = true; } else { $menuexists = false; } ?> <?php //DEVELOPER settings enabled if ($navdeveloper == 'yes') { //DISPLAY Custom DIV if ($navdiv == 'yes') { ?> <div class="widget block"> <?php } else { } } else { ?> <div class="widget block"> <?php } ?> <h3><?php echo $navtitle; ?> </h3> <?php if ($menuexists) { ?> <?php //DEVELOPER settings enabled if ($navdeveloper == 'yes') { //DISPLAY Custom UL if ($navul == 'yes') { ?> <ul class="custom-nav"> <?php } else { } } else { ?> <ul class="custom-nav"> <?php } ?> <?php //DISPLAY custom navigation menu if (get_option('woo_custom_nav_menu') == 'true') { woo_custom_navigation_output('name=' . $woo_custom_nav_menu_name . '&desc=' . $navwidgetdescription); } ?> <?php //DEVELOPER settings enabled if ($navdeveloper == 'yes') { //DISPLAY Custom UL if ($navul == 'yes') { ?> </ul> <?php } else { } } else { ?> </ul> <?php } ?> <?php } else { echo "You have not setup the custom navigation widget correctly, please check your settings in the backend."; } ?> <?php //DEVELOPER settings enabled if ($navdeveloper == 'yes') { //DISPLAY Custom DIV if ($navdiv == 'yes') { ?> </div> <?php } else { } } else { ?> </div> <?php } ?> <!-- /#nav-container --> <?php }
function woo_nav() { global $woo_options; woo_nav_before(); ?> <nav id="navigation" class="col-full" role="navigation"> <section class="menus"> <?php woo_nav_inside(); ?> <a href="<?php echo home_url(); ?> " class="nav-home"><span><?php _e('Home', 'woothemes'); ?> </span></a> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { echo '<h3>' . woo_get_menu_name('primary-menu') . '</h3>'; wp_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu')); } else { ?> <ul id="main-nav" class="nav fl"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output('name=Woo Menu 1'); } } else { ?> <?php if (is_page()) { $highlight = 'page_item'; } else { $highlight = 'page_item current_page_item'; } ?> <li class="<?php echo esc_attr($highlight); ?> "><a href="<?php echo esc_url(home_url('/')); ?> "><?php _e('Home', 'woothemes'); ?> </a></li> <?php wp_list_pages('sort_column=menu_order&depth=6&title_li=&exclude='); ?> <?php } ?> </ul><!-- /#nav --> <?php } ?> </section><!-- /.menus --> <a href="#top" class="nav-close"><span><?php _e('Return to Content', 'woothemes'); ?> </span></a> </nav> <?php woo_nav_after(); }
<?php woo_nav_before(); ?> <div id="navigation" class="col-full"> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { wp_nav_menu(array('depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu')); } else { ?> <ul id="main-nav" class="nav fl"> <?php if (wootique_get_woo_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output(); } } else { ?> <?php if (is_page()) { $highlight = "page_item"; } else { $highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?> "><a href="<?php echo home_url('/');
</span> </div><!-- /#logo --> <div id="navigation" class="fr"> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { nxt_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu')); } else { ?> <ul id="main-nav" class="nav fl"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output("name=Woo Menu 1"); } } else { ?> <?php if (is_page()) { $highlight = "page_item"; } else { $highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?> "><a href="<?php
?> </span> </div><!-- /#logo --> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { wp_nav_menu(array('depth' => 4, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'nav', 'menu_class' => 'fr', 'theme_location' => 'primary-menu')); } else { ?> <ul id="nav" class="fr"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output('depth=4'); } } else { ?> <?php if (is_page() || is_archive() || is_single() || is_tag()) { $highlight = "page_item"; } else { $highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?> home_link"><a href="<?php
include TEMPLATEPATH . '/includes/page-nav.php'; } ?> <div id="cat-nav"> <div class="col-full"> <ul id="secnav" class="fl"> <?php if (get_option('woo_custom_nav_menu') == 'true' && function_exists('woo_custom_navigation_output')) { if (get_option('woo_menu_desc') == "true") { $desc = 1; } woo_custom_navigation_output("name=Woo Menu 2&desc=" . $desc); } else { ?> <?php foreach (get_categories('hide_empty=0&exclude=' . get_option('woo_nav_exclude')) as $category) { if ($category->category_parent == '0') { ?> <li> <a href="<?php echo get_category_link($category->cat_ID); ?> "><?php echo $category->cat_name; if ($GLOBALS[desc]) {
function woo_nav() { global $woo_options; woo_nav_before(); ?> <div id="navigation" class="col-md-9 col-sm-9"> <?php if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) { ?> <ul style="float:left; z-index:10000;" class="nav"> <?php global $woocommerce; $shop_page_url = get_permalink(woocommerce_get_page_id('shop')); ?> <li class="menu-item-cat menu-item-type-post_type menu-item-object-page"><a href="<?php echo $shop_page_url; ?> ">Shop</a><ul class="menu-cat-woo hidden-xs"> <div class="ctitle"> <h4>Categories</h4> </div> <?php $taxonomy = 'product_cat'; $orderby = 'name'; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // 1 for yes, 0 for no $title = ''; $empty = 0; $args = array('taxonomy' => $taxonomy, 'orderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'title_li' => $title, 'hide_empty' => $empty); $all_categories = get_categories($args); //print_r($all_categories); foreach ($all_categories as $cat) { //print_r($cat); if ($cat->category_parent == 0) { $category_id = $cat->term_id; echo '<li><a href="' . get_term_link($cat->slug, 'product_cat') . '">' . $cat->name . '</a></li>'; $args2 = array('taxonomy' => $taxonomy, 'child_of' => 0, 'parent' => $category_id, 'orderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'title_li' => $title, 'hide_empty' => $empty); $sub_cats = get_categories($args2); if ($sub_cats) { foreach ($sub_cats as $sub_category) { echo $sub_category->name; } } } } ?> </ul></li> </ul> <?php wp_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav', 'theme_location' => 'primary-menu')); } else { ?> <ul id="main-nav" class="nav fl"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output('name=Woo Menu 1'); } } else { ?> <?php if (is_page()) { $highlight = 'page_item'; } else { $highlight = 'page_item current_page_item'; } ?> <li class="<?php echo esc_attr($highlight); ?> "><a href="<?php echo esc_url(home_url('/')); ?> "><?php _e('Home', 'woothemes'); ?> </a></li> <?php } ?> </ul> <?php } ?> <form role="search" method="get" id="w-searchform" action="<?php bloginfo('url'); ?> "> <input class="i-search" type="text" value="" placeholder="SEARCH" name="s" id="s" /> <input type="hidden" id="searchsubmit" value="'. __('Search') .'" /> <input type="hidden" name="post_type" value="product" /> </form> </div> <?php woo_nav_after(); }
/** * The template for displaying the logo (text or img) * * * @package Customizr * @since Customizr 3.0 */ function tc_logo_title_display() { //declare useful vars $logo_src = apply_filters('tc_logo_src', esc_url(tc__f('__get_option', 'tc_logo_upload'))); $logo_resize = esc_attr(tc__f('__get_option', 'tc_logo_resize')); $accepted_formats = array('jpg', 'jpeg', 'png', 'gif'); $filetype = wp_check_filetype($logo_src); $logo_class = apply_filters('tc_logo_class', 'brand span3'); ?> <?php if (!empty($logo_src) && in_array($filetype['ext'], $accepted_formats)) { ?> <?php //filter args $filter_args = array('logo_src' => $logo_src, 'logo_resize' => $logo_resize, 'logo_class' => $logo_class); ob_start(); $width = ''; $height = ''; //gets height and width from image, we check if getimagesize can be used first with the error control operator if (@getimagesize($logo_src)) { list($width, $height) = getimagesize($logo_src); } ?> <div class="<?php echo $logo_class; ?> "> <?php do_action('__before_logo'); printf('<a class="site-logo" href="%1$s" title="%2$s | %3$s"><img src="%4$s" alt="%5$s" width="%6$s" height="%7$s" %8$s /></a>', apply_filters('tc_logo_link_url', esc_url(home_url('/'))), apply_filters('tc_site_name_text', __(esc_attr(get_bloginfo('name')))), apply_filters('tc_tagline_text', __(esc_attr(get_bloginfo('description')))), $logo_src, __('Back Home', 'customizr'), $width, $height, 1 == $logo_resize ? sprintf('style="max-width:%1$spx;max-height:%2$spx"', apply_filters('__max_logo_width', 250), apply_filters('__max_logo_height', 100)) : ''); do_action('__after_logo'); ?> </div> <!-- brand span3 --> <?php $html = ob_get_contents(); if ($html) { ob_end_clean(); } echo apply_filters('tc_logo_img_display', $html, $filter_args); ?> <?php } else { ?> <?php ob_start(); ?> <div class="<?php echo $logo_class; ?> pull-left"> <?php do_action('__before_logo'); printf('<%1$s><a class="site-title" href="%2$s" title="%3$s | %4$s">%3$s</a></%1$s>', apply_filters('tc_site_title_tag', 'h1'), apply_filters('tc_logo_link_url', esc_url(home_url('/'))), apply_filters('tc_site_name_text ', __(esc_attr(get_bloginfo('name')))), apply_filters('tc_tagline_text ', __(esc_attr(get_bloginfo('description'))))); do_action('__after_logo'); ?> </div> <!-- brand span3 pull-left --> <?php $html = ob_get_contents(); if ($html) { ob_end_clean(); } echo apply_filters('tc_logo_text_display', $html, $logo_class); ?> <?php } ?> <div class="nav1"> <ul id="main-nav" class="nav fl"> <?php if (get_option('woo_custom_nav_menu') == 'true') { if (function_exists('woo_custom_navigation_output')) { woo_custom_navigation_output("name=Woo Menu 1"); } } else { ?> <?php if (is_page()) { $highlight = "page_item"; } else { $highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?> "><a href="<?php bloginfo('url'); ?> "><?php _e('Home', 'woothemes'); ?> </a></li> <?php wp_list_pages('sort_column=menu_order&depth=6&title_li=&exclude='); ?> <?php } ?> </ul><!-- /#nav --> </div> <?php }