'; ?> ', ', ', '' ); if ( $tags_list && get_theme_mod('estore_postmeta_tags', '') == '' ) echo $tags_list; echo ''; endif; } endif; if ( ! function_exists( 'estore_layout_class' ) ) : /** * Generate layout class for sidebar based on customizer and post meta settings. */ function estore_layout_class() { global $post; $layout = get_theme_mod( 'estore_global_layout', 'right_sidebar' ); // Front page displays in Reading Settings $page_for_posts = get_option('page_for_posts'); // Get Layout meta if($post) { $layout_meta = get_post_meta( $post->ID, 'estore_page_specific_layout', true ); } // Home page if Posts page is assigned if( is_home() && !( is_front_page() ) ) { $queried_id = get_option( 'page_for_posts' ); $layout_meta = get_post_meta( $queried_id, 'estore_page_specific_layout', true ); if( $layout_meta != 'default_layout' && $layout_meta != '' ) { $layout = get_post_meta( $queried_id, 'estore_page_specific_layout', true ); } } elseif( is_page() ) { $layout = get_theme_mod( 'estore_default_page_layout', 'right_sidebar' ); if( $layout_meta != 'default_layout' && $layout_meta != '' ) { $layout = get_post_meta( $post->ID, 'estore_page_specific_layout', true ); } } elseif( is_single() ) { $layout = get_theme_mod( 'estore_default_single_post_layout', 'right_sidebar' ); if( $layout_meta != 'default_layout' && $layout_meta != '' ) { $layout = get_post_meta( $post->ID, 'estore_page_specific_layout', true ); } } return $layout; } endif; if ( ! function_exists( 'estore_breadcrumbs' ) ) : /** * Display Breadcrumbs * * This code is a modified version of Melissacabral's original menu code for dimox_breadcrumbs(). * */ function estore_breadcrumbs(){ /* === OPTIONS === */ $text['home'] = esc_html__('Home', 'estore'); // text for the 'Home' link $text['category'] = esc_html__('Archive by Category "%s"', 'estore'); // text for a category page $text['tax'] = esc_html__('Archive for "%s"', 'estore'); // text for a taxonomy page $text['search'] = esc_html__('Search Results for "%s" query', 'estore'); // text for a search results page $text['tag'] = esc_html__('Posts Tagged "%s"', 'estore'); // text for a tag page $text['author'] = esc_html__('Articles Posted by %s', 'estore'); // text for an author page $text['404'] = esc_html__('Error 404', 'estore'); // text for the 404 page $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $showOnHome = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = ' ⁄ '; // delimiter between crumbs $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb /* === END OF OPTIONS === */ global $post; $homeLink = esc_url(home_url()) . '/'; $linkBefore = ''; $linkAfter = ''; $linkAttr = ' rel="v:url" property="v:title"'; $link = $linkBefore . '%2$s' . $linkAfter; if (is_home() || is_front_page()) { if ($showOnHome == 1) echo '
' . $text['home'] . '
'; } else { echo '
' . sprintf($link, $homeLink, $text['home']) . $delimiter; if ( is_category() ) { $thisCat = get_category(get_query_var('cat'), false); if ($thisCat->parent != 0) { $cats = get_category_parents($thisCat->parent, TRUE, $delimiter); $cats = str_replace('', '' . $linkAfter, $cats); echo $cats; } echo $before . sprintf($text['category'], single_cat_title('', false)) . $after; } elseif( is_tax() ){ $thisCat = get_category(get_query_var('cat'), false); if ($thisCat->parent != 0) { $cats = get_category_parents($thisCat->parent, TRUE, $delimiter); $cats = str_replace('', '' . $linkAfter, $cats); echo $cats; } echo $before . sprintf($text['tax'], single_cat_title('', false)) . $after; }elseif ( is_search() ) { echo $before . sprintf($text['search'], get_search_query()) . $after; } elseif ( is_day() ) { echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter; echo sprintf($link, get_month_link(get_the_time('Y'),get_the_time('m')), get_the_time('F')) . $delimiter; echo $before . get_the_time('d') . $after; } elseif ( is_month() ) { echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter; echo $before . get_the_time('F') . $after; } elseif ( is_year() ) { echo $before . get_the_time('Y') . $after; } elseif ( is_single() && !is_attachment() ) { if ( get_post_type() != 'post' ) { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; printf($link, $homeLink . '/' . $slug['slug'] . '/', $post_type->labels->singular_name); if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after; } else { $cat = get_the_category(); $cat = $cat[0]; $cats = get_category_parents($cat, TRUE, $delimiter); if ($showCurrent == 0) $cats = preg_replace("#^(.+)$delimiter$#", "$1", $cats); $cats = str_replace('', '' . $linkAfter, $cats); echo $cats; if ($showCurrent == 1) echo $before . get_the_title() . $after; } } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) { $post_type = get_post_type_object(get_post_type()); echo $before . $post_type->labels->singular_name . $after; } elseif ( is_attachment() ) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); $cat = $cat[0]; $cats = get_category_parents($cat, TRUE, $delimiter); $cats = str_replace('', '' . $linkAfter, $cats); echo $cats; printf($link, get_permalink($parent), $parent->post_title); if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after; } elseif ( is_page() && !$post->post_parent ) { if ($showCurrent == 1) echo $before . get_the_title() . $after; } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID)); $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); for ($i = 0; $i < count($breadcrumbs); $i++) { echo $breadcrumbs[$i]; if ($i != count($breadcrumbs)-1) echo $delimiter; } if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after; } elseif ( is_tag() ) { echo $before . sprintf($text['tag'], single_tag_title('', false)) . $after; } elseif ( is_author() ) { global $author; $userdata = get_userdata($author); echo $before . sprintf($text['author'], $userdata->display_name) . $after; } elseif ( is_404() ) { echo $before . $text['404'] . $after; } if ( get_query_var('paged') ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' ('; echo esc_html__( 'Page', 'estore' ) . ' ' . get_query_var('paged'); if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')'; } echo '
'; } } // end estore_breadcrumbs() endif; if ( ! function_exists( 'estore_sidebar_select' ) ) : /** * Select and show sidebar based on post meta and customizer default settings */ function estore_sidebar_select() { $layout = estore_layout_class(); if( $layout != "no_sidebar_full_width" && $layout != "no_sidebar_content_centered" ) { if ( $layout == "right_sidebar" ) { get_sidebar(); } else { get_sidebar('left'); } } } endif; if( ! function_exists( 'estore_category_color_css' ) ) : /** * Generate color for Category and print on head */ function estore_category_color_css(){ $categories = get_terms( 'category', array( 'hide_empty' => false ) ); //print_r($categories); $cat_color_css = ''; foreach($categories as $category){ $cat_color = get_theme_mod( 'estore_category_color_'.strtolower($category->name) ); $hover_color = estore_darkcolor($cat_color, -200); $cat_id = $category->term_id; if(!empty($cat_color)) { $cat_color_css .= ' /* Border Color */ .estore-cat-color_'.$cat_id.' .cart-wishlist-btn a i, .estore-cat-color_'.$cat_id.' .cart-wishlist-btn a i:hover, .estore-cat-color_'.$cat_id.' .hot-product-content-wrapper .hot-img{border-color: '.$cat_color.'} /* Background Color */ .estore-cat-color_'.$cat_id.' .cart-wishlist-btn a i:hover, .estore-cat-color_'.$cat_id.' .hot-content-wrapper .single_add_to_wishlist, .estore-cat-color_'.$cat_id.' .hot-content-wrapper .single_add_to_wishlist:hover, .estore-cat-color_'.$cat_id.' .hot-product-title, .widget-collection .estore-cat-color_'.$cat_id.' .page-title::after, .estore-cat-color_'.$cat_id.' .widget-featured-collection .page-title:after{background: '.$cat_color.'} /* Color */ .estore-cat-color_'.$cat_id.' .sorting-form-wrapper a,.estore-cat-color_'.$cat_id.' .section-title-wrapper .section-title-block .page-title a:hover, .estore-cat-color_'.$cat_id.' .hot-content-wrapper .star-rating, .estore-cat-color_'.$cat_id.' .hot-content-wrapper .hot-title a:hover, .estore-cat-color_'.$cat_id.' .cart-wishlist-btn a i, .estore-cat-color_'.$cat_id.' .product-list-wrap .product-list-block .product-list-content .price ins, .estore-cat-color_'.$cat_id.' .product-list-wrap .product-list-block .product-list-content .product-list-title a:hover, .estore-cat-color_'.$cat_id.' .hot-product-content-wrapper .hot-img .cart-price-wrapper .add_to_cart_button:hover{color:'.$cat_color.'} '; } } if( !empty( $cat_color_css ) ) { ?> a, #site-navigation ul li.current-menu-item > a, #site-navigation ul li:hover > a:after, .slider-caption-wrapper .slider-title a:hover, .widget_vertical_promo .slider-title a:hover, .hot-content-wrapper .star-rating, .product-list-wrap .product-list-block .product-list-content .price ins, .widget-collection .cart-wishlist-btn a i, .widget-collection .cart-wishlist-btn a.added_to_cart:after, .widget-about .tg-container .about-content-wrapper .about-block .about-sub-title, .page-header .entry-title, .entry-title a:hover, .entry-btn .btn:hover, .entry-meta a:hover, .woocommerce-page ul.products li.product .star-rating, .woocommerce-page ul.products li.product .price ins, .woocommerce-page ul.products li.product .yith-wcwl-add-to-wishlist .feedback, .single-product.woocommerce-page .product .summary .price, .single-product.woocommerce-page .product .woocommerce-product-rating .star-rating, .widget.woocommerce .star-rating, .cart-empty, .woocommerce .woocommerce-info:before, .woocommerce .woocommerce-error:before, .woocommerce .woocommerce-message:before, .toggle-wrap:hover i, #cancel-comment-reply-link, #cancel-comment-reply-link:before, .logged-in-as a { color: '.$primary_color.'; } .widget-title span, #lang_sel_click ul ul, .wcmenucart-contents .cart-value, #category-navigation, #category-navigation ul.sub-menu, #masthead .widget_shopping_cart, .widget_shopping_cart .button:hover, .woocommerce .widget_shopping_cart_content .buttons a.button:hover, #site-navigation .sub-menu, .search-wrapper .header-search-box, .hot-product-content-wrapper .hot-img, .widget-collection .cart-wishlist-btn a i, .widget-collection .cart-wishlist-btn a.added_to_cart:after, .single-product.woocommerce-page .product .images .thumbnails a, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error, .woocommerce .woocommerce-message, .menu-primary-container, .comment-list .comment-body{ border-color: '.$primary_color.'; } .search-wrapper .header-search-box:before, #masthead .widget_shopping_cart::before{ border-bottom-color:'.$primary_color.'; } .big-slider .bx-controls .bx-prev:hover, .category-slider .bx-controls .bx-prev:hover{ border-left-color:'.$primary_color.'; } .big-slider .bx-controls .bx-next:hover, .category-slider .bx-controls .bx-next:hover{ border-right-color:'.$primary_color.'; } #primary-menu{ border-top-color:'.$primary_color.'; } a:hover, a:focus, a:active, #category-navigation ul li:hover > a, .section-title-wrapper .section-title-block .page-title a:hover, .view-all a:hover, .men-collection-color .section-title-wrapper .section-title-block .page-title a:hover, .hot-product-content-wrapper .hot-img .cart-price-wrapper .add_to_cart_button:hover, .hot-product-content-wrapper .hot-img .cart-price-wrapper .added_to_cart:hover, .hot-content-wrapper .hot-title a:hover, .product-list-wrap .product-list-block .product-list-content .product-list-title a:hover, .page-header .entry-sub-title span a:hover, .woocommerce-page ul.products li.product .products-title a:hover, .woocommerce .widget_layered_nav_filters ul li a:hover, .woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-name a:hover, .woocommerce .widget_layered_nav_filters ul li a:hover, .woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-name a:hover, .woocommerce #content .wishlist_table tbody tr td.product-name a:hover, .comment-author .fn .url:hover { color: '.$primary_dark.' } .hot-content-wrapper .single_add_to_wishlist:hover, .widget-collection .cart-wishlist-btn a i:hover, .woocommerce-page ul.products li.product .products-img .products-hover-wrapper .products-hover-block a:hover, .woocommerce-page ul.products li.product .yith-wcwl-add-to-wishlist .add_to_wishlist.button.alt:hover, .woocommerce-page ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a:hover, .woocommerce-page ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a:hover, .single-product.woocommerce-page .product .cart .single_add_to_cart_button:hover, .single-product.woocommerce-page .product .yith-wcwl-add-to-wishlist .add_to_wishlist.button.alt:hover, .single-product.woocommerce-page .product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a:hover, .single-product.woocommerce-page .product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a:hover, .single-product.woocommerce-page .product .yith-wcwl-add-to-wishlist .single_add_to_cart_button:hover, .woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-remove a:hover, .woocommerce-cart .woocommerce table.shop_table.cart tr td.actions input[type="submit"]:hover, .woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-remove a:hover, .woocommerce-cart .woocommerce table.shop_table.cart tr td.actions input[type="submit"]:hover, .woocommerce .cart-collaterals .cart_totals .shop_table td button:hover, .woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button:hover, .woocommerce ul.products li.product .add_to_cart_button:hover, .return-to-shop a.button:hover, .woocommerce #content .wishlist_table tbody tr td.product-remove a.remove_from_wishlist:hover, .woocommerce #content .wishlist_table tbody tr td.product-add-to-cart a:hover, .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .slider-caption-wrapper .slider-btn i, .slider-caption-wrapper .slider-btn:hover, .sub-toggle:hover, .scrollup:hover, .scrollup:active, .scrollup:focus { background: '.$primary_dark.' } .widget-collection .cart-wishlist-btn a i:hover, .woocommerce-page ul.products li.product .products-img .products-hover-wrapper .products-hover-block a:hover{ border-color: '.$primary_dark.' } }'; } if( !empty( $estore_internal_css ) ) { ?> '; ?>