Shop > Product category > Product Name * * @param $trail * * @return array */ function bicycleshop_custom_breadcrumbs_trail_add_product_categories( $trail ) { if( ( get_post_type() === 'product' ) && is_singular() ){ global $post; $taxonomy = 'product_cat'; $terms = get_the_terms( $post->ID, $taxonomy ); $links = array(); if( $terms && ! is_wp_error( $terms ) ){ $count = 0; foreach( $terms as $c ) { $count ++; $parents = bicycleshop_wc_get_term_parents( $c->term_id, $taxonomy, true, ', ', $c->name, array() ); if( $parents != '' && ! is_wp_error( $parents ) ){ $parents_arr = explode( ', ', $parents ); foreach( $parents_arr as $p ) { if( $p != '' ){ $links[] = $p; } } } } // Add the trail back on to the end. $trail_end = get_the_title( $post->ID ); // Add the new links, and the original trail's end, back into the trail. array_splice( $trail, 2, count( $trail ) - 1, $links ); $trail['trail_end'] = $trail_end; //remove any duplicate breadcrumbs $trail = array_unique( $trail ); } } return $trail; } } add_filter( 'woo_breadcrumbs_trail', 'bicycleshop_custom_breadcrumbs_trail_add_product_categories', 20 ); if ( ! function_exists( 'bicycleshop_wc_get_term_parents' ) ) { /** * Retrieve term parents with separator. * * @param int $id Term ID. * @param string $taxonomy. * @param bool $link Optional, default is false. Whether to format with link. * @param string $separator Optional, default is '/'. How to separate terms. * @param bool $nice_name Optional, default is false. Whether to use nice name for display. * @param array $visited Optional. Already linked to terms to prevent duplicates. * * @return string */ function bicycleshop_wc_get_term_parents( $id, $taxonomy, $link = false, $separator = '/', $nice_name = false, $visited = array() ) { $chain = ''; $parent = &get_term( $id, $taxonomy ); if ( is_wp_error( $parent ) ) return $parent; if ( $nice_name ) { $name = $parent->slug; } else { $name = $parent->name; } if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) { $visited[] = $parent->parent; $chain .= bicycleshop_wc_get_term_parents( $parent->parent, $taxonomy, $link, $separator, $nice_name, $visited ); } if ( $link ) { $chain .= 'name ) ) . '">'.$parent->name.'' . $separator; } else { $chain .= $name.$separator; } return $chain; } } if ( ! function_exists( 'bicycleshop_wp_change_breadcrumb_delimiter' ) ) { /** * change breadcrumb delimiter * * @param $defaults * * @return mixed */ function bicycleshop_wp_change_breadcrumb_delimiter( $defaults ) { // Change the breadcrumb delimiter from '/' to '>' $defaults['delimiter'] = '/'; return $defaults; } } add_filter( 'woocommerce_breadcrumb_defaults', 'bicycleshop_wp_change_breadcrumb_delimiter' ); /*************************/ /***** THEME WRAPPERS ****/ /*************************/ if(!function_exists('bicycleshop_woocommerce_theme_wrapper_start')){ /** * start html of WC templates */ function bicycleshop_woocommerce_theme_wrapper_start() { global $bicycleshop_a13; $lazy_load = $bicycleshop_a13->get_option('shop_lazy_load') === 'on'; $pagination_class = $lazy_load && bicycleshop_is_woocommerce_products_list_page()? ' lazy-load-on' : ''; $custom_thumbs = $bicycleshop_a13->get_option('product_custom_thumbs') === 'on'; $thumbnails_class = ''; if( $custom_thumbs ){ add_filter( 'woocommerce_product_thumbnails_columns', 'bicycleshop_wc_single_product_thumbs_columns' ); $thumbnails_class = ' theme-thumbs'; } else{ add_filter( 'woocommerce_gallery_thumbnail_size', function() { return 'thumbnail'; } ); } add_filter( 'woocommerce_show_page_title', '__return_false'); bicycleshop_title_bar(); ?>
get_option( 'product_related_products' ) === 'off' ){ return; } $args = array( 'posts_per_page' => 3, 'columns' => 3, ); woocommerce_related_products( $args ); } } /************************/ /***** PRODUCTS LIST ****/ /************************/ if(!function_exists('bicycleshop_wc_loop_second_image')){ /** * add second image, so it can be revealed on hover */ function bicycleshop_wc_loop_second_image() { /* @var $product WC_Product */ global $product, $bicycleshop_a13; if($bicycleshop_a13->get_option( 'shop_products_second_image' ) === 'on') { //second thumb $attachment_ids = $product->get_gallery_image_ids(); $is_enough_images = sizeof( $attachment_ids ) > 0; if ( $attachment_ids && $is_enough_images ) { $image = wp_get_attachment_image( $attachment_ids[0], 'shop_catalog' ); if ( strlen( $image ) ) { echo '' . wp_kses_post($image) . ''; } } } } } add_action( 'woocommerce_before_shop_loop_item_title', 'bicycleshop_wc_loop_second_image', 10); if(!function_exists( 'bicycleshop_wc_single_product_labels' )){ /** * add labels above to single product */ function bicycleshop_wc_single_product_labels() { /* @var $product WC_Product */ global $product; $html = ''; //labels //out of stock if(!$product->is_in_stock()){ $html .= ''.esc_html__( 'Out of stock', 'bicycleshop' ).''; } else{ //sale if($product->is_on_sale()){ $html .= ''.esc_html__( 'Sale', 'bicycleshop' ).''; } //new if(bicycleshop_is_product_new()){ $html .= ''.esc_html__( 'New', 'bicycleshop' ).''; } } if(strlen($html)){ echo '
'.wp_kses_post($html).'
'; } } } add_action( 'woocommerce_before_shop_loop_item_title', 'bicycleshop_wc_single_product_labels', 11); if(!function_exists( 'bicycleshop_wc_loop_single_product_categories' )){ /** * display categories of product */ function bicycleshop_wc_loop_single_product_categories() { global $product; //categories $terms = get_the_terms( bicycleshop_wc_get_product_id($product), 'product_cat' ); if( sizeof( $terms ) && is_array($terms) ){ echo ''; $temp = 1; foreach ( $terms as $term ) { if($temp > 1){ echo '/'; } echo esc_html($term->name); $temp++; } echo ''; } } } add_action( 'woocommerce_before_shop_loop_item_title', 'bicycleshop_wc_loop_single_product_categories', 13); if(!function_exists( 'bicycleshop_wc_loop_single_product_overlay' )){ function bicycleshop_wc_loop_single_product_overlay() { global $bicycleshop_a13; if($bicycleshop_a13->get_option( 'shop_products_variant' ) === 'overlay'){ echo ''; } } } add_action( 'woocommerce_before_shop_loop_item_title', 'bicycleshop_wc_loop_single_product_overlay', 11); add_action( 'woocommerce_before_subcategory_title', 'bicycleshop_wc_loop_single_product_overlay', 11); if(!function_exists( 'bicycleshop_wc_loop_single_product_text_div' )){ /** * pack text content under thumbnail in div.product-details */ function bicycleshop_wc_loop_single_product_text_div() { echo '
'; } function bicycleshop_wc_loop_single_product_text_div_close() { echo '
'; } } add_action( 'woocommerce_before_shop_loop_item_title', 'bicycleshop_wc_loop_single_product_text_div', 12); add_action( 'woocommerce_after_shop_loop_item_title', 'bicycleshop_wc_loop_single_product_text_div_close', 21); add_action( 'woocommerce_before_subcategory_title', 'bicycleshop_wc_loop_single_product_text_div', 12); add_action( 'woocommerce_after_subcategory_title', 'bicycleshop_wc_loop_single_product_text_div_close', 21); if (!function_exists('bicycleshop_wc_loop_shop_per_page')) { /** * Change number or products per page * * @return int number of products */ function bicycleshop_wc_loop_shop_per_page() { global $bicycleshop_a13; return $bicycleshop_a13->get_option( 'shop_products_per_page'); } } add_filter( 'loop_shop_per_page', 'bicycleshop_wc_loop_shop_per_page', 20 ); if( ! function_exists( 'bicycleshop_wc_loop_columns' ) ){ /** * Change number or products per row * * @return int number of columns */ function bicycleshop_wc_loop_columns() { global $bicycleshop_a13; return $bicycleshop_a13->get_option( 'shop_products_columns' ); } } add_filter('loop_shop_columns', 'bicycleshop_wc_loop_columns'); if ( ! function_exists( 'woocommerce_result_count' ) ) { /** * Overwrite WooCommerce template function * * Output the result count text (Showing x - x of x results). */ function woocommerce_result_count() { global $wp_query; if ( ! woocommerce_products_will_display() ){ return; } echo ''; $paged = max( 1, $wp_query->get( 'paged' ) ); $total = $wp_query->found_posts; $last = min( $total, $wp_query->get( 'posts_per_page' ) * $paged ); if ( 1 == $total ) { echo '1/1'; } else { printf( '%1$d/%2$d', esc_html($last), esc_html($total) ); } echo ''; } } if ( ! function_exists( 'woocommerce_pagination' ) ) { /** * Overwrite WooCommerce template function * * Output the pagination. */ function woocommerce_pagination() { if ( ! woocommerce_products_will_display() ) { return; } //since WC 3.3.0 if ( function_exists('wc_get_loop_prop') && wc_get_loop_prop( 'is_shortcode' ) ) { $base = esc_url_raw( add_query_arg( 'product-page', '%#%', false ) ); $format = '?product-page = %#%'; } else { $base = esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) ); $format = ''; } global $wp_query; if ( $wp_query->max_num_pages <= 1 ) { return; } // Set up paginated links. $links = paginate_links( apply_filters( 'woocommerce_pagination_args', array( 'base' => $base, 'format' => $format, 'add_args' => '', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, 'prev_text' => '←', 'next_text' => '→', 'type' => 'list', 'end_size' => 3, 'mid_size' => 3 ) ) ); if ( $links ) { echo wp_kses_post( _navigation_markup( $links, 'woocommerce-pagination' ) ); } } } //change pagination to default WordPress style add_filter('woocommerce_pagination_args', 'bicycleshop_loop_pagination', 20); //remove sale badge from loop remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash' ); //move number of results to different place remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); add_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 ); //remove ordering remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); /*************************/ /***** SINGLE PRODUCT ****/ /*************************/ if ( ! function_exists( 'bicycleshop_wc_single_product_thumbs_columns' ) ) { /** * One column of thumbnails in single product * * @return int columns */ function bicycleshop_wc_single_product_thumbs_columns(){ return 1; } } if ( ! function_exists( 'bicycleshop_wc_single_product_avatars' ) ) { /** * Changes size of avatars in WooCommerce shop * * @return int width in px */ function bicycleshop_wc_single_product_avatars() { return 90; } } add_filter( 'woocommerce_review_gravatar_size', 'bicycleshop_wc_single_product_avatars' ); //product labels add_action( 'woocommerce_product_thumbnails', 'bicycleshop_wc_single_product_labels', 12); //remove sale badge remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 ); //move rating remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 4 ); /***************/ /***** CART ****/ /***************/ if ( ! function_exists( 'bicycleshop_wc_header_add_to_cart_fragment' ) ) { /** * update cart quantity in theme cart fragment * * @param $fragments * * @return mixed */ function bicycleshop_wc_header_add_to_cart_fragment( $fragments ){ global $woocommerce; $number = $woocommerce->cart->cart_contents_count; $fragments['span#basket-items-count'] = ' 0 ? '' : 'class="zero"' ).'>'.$number.''; return $fragments; } } add_filter('woocommerce_add_to_cart_fragments', 'bicycleshop_wc_header_add_to_cart_fragment'); /* do not hide mini cart on the checkout and on the cart pages */ add_filter( 'woocommerce_widget_cart_is_hidden', '__return_false', 40, 0 ); if( ! function_exists( 'bicycleshop_wc_min_cart_footer' ) ){ /** * Adds "go to shop" button when cart is empty */ function bicycleshop_wc_min_cart_footer() { if( WC()->cart->is_empty() ): ?>

'; } elseif($template_name === 'checkout/form-coupon.php'){ echo '
'; } } function bicycleshop_wc_checkout_columns_close($template_name){ if($template_name === 'checkout/form-login.php'){ echo '
'; } elseif($template_name === 'checkout/form-coupon.php'){ echo ''; } } } add_action( 'woocommerce_before_template_part', 'bicycleshop_wc_checkout_columns_open', 9, 1 ); add_action( 'woocommerce_after_template_part', 'bicycleshop_wc_checkout_columns_close', 11, 1 ); if ( ! function_exists( 'bicycleshop_wc_checkout_notices_open' ) ) { /** * Move notice on checkout page to second column to not make it too wide */ function bicycleshop_wc_checkout_notices_open(){ echo '
'; } function bicycleshop_wc_checkout_notices_close(){ echo '
'; } } add_action( 'woocommerce_before_checkout_form', 'bicycleshop_wc_checkout_notices_open', 9 ); add_action( 'woocommerce_before_checkout_form', 'bicycleshop_wc_checkout_notices_close', 11 ); /***********************/ /*** NOT TO OVERRIDE **/ /***********************/ /** * Returns Product ID dependant on available functions * * @return int product_id */ function bicycleshop_wc_get_product_id($product){ return method_exists( $product, 'get_id' ) ? $product->get_id() : $product->id; } /** * Prepares CSS from theme settings from Customizer * * @return string CSS */ function bicycleshop_woocommerce_css() { global $bicycleshop_a13; /* * shop buttons */ $button_shop_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_bg_color' ) ); $button_shop_hover_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_bg_hover_color' ) ); $button_shop_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_color' ) ); $button_shop_hover_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_hover_color' ) ); $button_shop_alt_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_alt_bg_color' ) ); $button_shop_alt_hover_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_alt_bg_hover_color' ) ); $button_shop_alt_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_alt_color' ) ); $button_shop_alt_hover_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'button_shop_alt_hover_color' ) ); $button_shop_font_size = bicycleshop_make_css_rule( 'font-size', $bicycleshop_a13->get_option( 'button_shop_font_size' ), '%spx' ); $button_shop_weight = bicycleshop_make_css_rule( 'font-weight', $bicycleshop_a13->get_option( 'button_shop_weight' ) ); $button_shop_transform = bicycleshop_make_css_rule( 'text-transform', $bicycleshop_a13->get_option( 'button_shop_transform' ) ); $button_shop_padding = $bicycleshop_a13->get_option( 'button_shop_padding' ); $button_shop_padding_left = isset( $button_shop_padding['padding-left'] ) ? $button_shop_padding['padding-left'] : '0px'; $button_shop_padding_right = isset( $button_shop_padding['padding-right'] ) ? $button_shop_padding['padding-right'] : '0px'; /* * shop */ $shop_title_bar_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'shop_title_bar_image' ), 'url(%s)' ); $shop_title_bar_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'shop_title_bar_image_fit' ) ); $shop_title_bar_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'shop_title_bar_bg_color' ) ); $shop_title_bar_title_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'shop_title_bar_title_color' ) ); $shop_title_bar_color_1 = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'shop_title_bar_color_1' ) ); $shop_title_bar_space_width = $bicycleshop_a13->get_option( 'shop_title_bar_space_width' ) . 'px'; $shop_margin = $bicycleshop_a13->get_option( 'shop_brick_margin' ) . 'px'; //space in case of different layout mode $shop_layout_mode = $bicycleshop_a13->get_option( 'shop_products_layout_mode' ); $shop_item_bottom_gutter = ''; if ( $shop_layout_mode === 'fitRows' ) { $shop_item_bottom_gutter = 'margin-bottom: ' . $shop_margin . ';'; } /* * shop no major pages */ $shop_nmp_title_bar_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'shop_no_major_pages_title_bar_image' ), 'url(%s)' ); $shop_nmp_title_bar_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'shop_no_major_pages_title_bar_image_fit' ) ); $shop_nmp_title_bar_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'shop_no_major_pages_title_bar_bg_color' ) ); $shop_nmp_title_bar_title_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'shop_no_major_pages_title_bar_title_color' ) ); $shop_nmp_title_bar_color_1 = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'shop_no_major_pages_title_bar_color_1' ) ); $shop_nmp_title_bar_space_width = $bicycleshop_a13->get_option( 'shop_no_major_pages_title_bar_space_width' ) . 'px'; /* * single product page */ $product_title_bar_image = bicycleshop_make_css_rule( 'background-image', $bicycleshop_a13->get_option_media_url( 'product_title_bar_image' ), 'url(%s)' ); $product_title_bar_image_fit = bicycleshop_bg_fit_helper( $bicycleshop_a13->get_option( 'product_title_bar_image_fit' ) ); $product_title_bar_bg_color = bicycleshop_make_css_rule( 'background-color', $bicycleshop_a13->get_option_color_rgba( 'product_title_bar_bg_color' ) ); $product_title_bar_title_color = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'product_title_bar_title_color' ) ); $product_title_bar_color_1 = bicycleshop_make_css_rule( 'color', $bicycleshop_a13->get_option_color_rgba( 'product_title_bar_color_1' ) ); $product_title_bar_space_width = $bicycleshop_a13->get_option( 'product_title_bar_space_width' ) . 'px'; $css = " /* ================== SHOP BUTTONS ==================*/ .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled], .woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce input.button.alt, .wishlist_table .add_to_cart.button{ $button_shop_bg_color $button_shop_color $button_shop_font_size $button_shop_weight $button_shop_transform padding-left: $button_shop_padding_left; padding-right: $button_shop_padding_right; } .woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce input.button.alt{ $button_shop_alt_bg_color $button_shop_alt_color } .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .wishlist_table .add_to_cart.button:hover{ $button_shop_hover_bg_color $button_shop_hover_color } .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover, .woocommerce input.button.alt:hover{ $button_shop_alt_hover_bg_color $button_shop_alt_hover_color } /* ================== SHOP PRODUCTS LIST ==================*/ .woocommerce-page .title-bar.outside{ $shop_title_bar_image $shop_title_bar_image_fit } .woocommerce-page .title-bar.outside .overlay-color{ $shop_title_bar_bg_color padding-top: $shop_title_bar_space_width; padding-bottom: $shop_title_bar_space_width; } .woocommerce-page .title-bar.outside .page-title, .woocommerce-page .title-bar.outside h2{ $shop_title_bar_title_color } .woocommerce-page .title-bar.outside .breadcrumbs, .woocommerce-page .title-bar.outside .breadcrumbs a, .woocommerce-page .title-bar.outside .breadcrumbs a:hover{ $shop_title_bar_color_1 } .content-box ul.products{ margin-right: -$shop_margin; } .rtl .content-box ul.products{ margin-right: 0; margin-left: -$shop_margin; } .woocommerce-page ul.products li.product{ $shop_item_bottom_gutter } /* columns */ .woocommerce-page .shop-columns-4 ul.products li.product, .woocommerce-page .shop-columns-4 ul.products .grid-master{ width: 25%; width: calc(25% - $shop_margin); } .woocommerce-page .shop-columns-3 ul.products li.product, .woocommerce-page .shop-columns-3 ul.products .grid-master{ width: 33.3333333%; width: calc(33.3333333% - $shop_margin); } .woocommerce-page .shop-columns-2 ul.products li.product, .woocommerce-page .shop-columns-2 ul.products .grid-master{ width: 50%; width: 50%; width: calc(50% - $shop_margin); } .woocommerce-page .shop-columns-1 ul.products li.product, .woocommerce-page .shop-columns-1 ul.products .grid-master{ width: 100%; } /* sidebars */ .products-list .layout-full.with-sidebar .content-box, .products-list .layout-full_fixed.with-sidebar .content-box, .products-list .layout-full_padding.with-sidebar .content-box{ margin-left: $shop_margin; width: 75%; width: calc(75% - $shop_margin); } .products-list .layout-full.right-sidebar .content-box, .products-list .layout-full_fixed.right-sidebar .content-box, .products-list .layout-full_padding.right-sidebar .content-box{ margin-left: 0; margin-right: $shop_margin; } /* responsive rules */ @media only screen and (min-width: 1560px) { .products-list .layout-full.with-sidebar .content-box{ width: calc(100% - 320px".($shop_margin === '0px'? '' : ' - '.$shop_margin)."); /* 320 sidebar*/ } } @media only screen and (min-width: 1640px) { .products-list .layout-full_padding.with-sidebar .content-box{ width: calc(100% - 320px".($shop_margin === '0px'? '' : ' - '.$shop_margin)."); /* 320 sidebar*/ } } @media only screen and (max-width: 1400px) and (min-width: 1025px) { /* make sure that sidebar wont get too narrow */ .products-list .layout-full_padding.with-sidebar .content-box{ width: 70%; width: calc(70% - $shop_margin); } } @media only screen and (max-width: 1320px) and (min-width: 1025px) { /* make sure that sidebar wont get too narrow */ .products-list .layout-full.with-sidebar .content-box{ width: 70%; width: calc(70% - $shop_margin); } } @media only screen and (max-width: 1279px){ /* fluid layout columns */ /* 3 columns */ .woocommerce-page .layout-fluid.shop-columns-4 ul.products li.product, .woocommerce-page .layout-fluid.shop-columns-4 ul.products .grid-master{ width: 33.3333333%; width: calc(33.3333333% - $shop_margin); } /* 2 columns - when vertical header and sidebar are present */ .header-vertical.woocommerce-page .layout-fluid.with-sidebar.shop-columns-4 ul.products li.product, .header-vertical.woocommerce-page .layout-fluid.with-sidebar.shop-columns-4 ul.products .grid-master, .header-vertical.woocommerce-page .layout-fluid.with-sidebar.shop-columns-3 ul.products li.product, .header-vertical.woocommerce-page .layout-fluid.with-sidebar.shop-columns-3 ul.products .grid-master{ width: 50%; width: calc(50% - $shop_margin); } /* fixed layout columns */ /* 3 columns - when vertical header and sidebar are present */ .header-vertical.woocommerce-page .layout-fixed.layout-no-edge.with-sidebar.shop-columns-4 ul.products li.product, .header-vertical.woocommerce-page .layout-fixed.layout-no-edge.with-sidebar.shop-columns-4 ul.products .grid-master{ width: 33.3333333%; width: calc(33.3333333% - $shop_margin); } /* edge layout columns */ /* 3 columns - when vertical header and sidebar are present */ .header-vertical.woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products li.product, .header-vertical.woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products .grid-master{ width: 33.3333333%; width: calc(33.3333333% - $shop_margin); } } @media only screen and (max-width: 1080px) { /* fixed layout columns */ /* 3 columns */ .woocommerce-page .layout-fixed.layout-no-edge.shop-columns-4 ul.products li.product, .woocommerce-page .layout-fixed.layout-no-edge.shop-columns-4 ul.products .grid-master{ width: 33.3333333%; width: calc(33.3333333% - $shop_margin); } /* 2 columns - when vertical header and sidebar are present */ .header-vertical.woocommerce-page .layout-fixed.layout-no-edge.with-sidebar.shop-columns-4 ul.products li.product, .header-vertical.woocommerce-page .layout-fixed.layout-no-edge.with-sidebar.shop-columns-4 ul.products .grid-master, .header-vertical.woocommerce-page .layout-fixed.layout-no-edge.with-sidebar.shop-columns-3 ul.products li.product, .header-vertical.woocommerce-page .layout-fixed.layout-no-edge.with-sidebar.shop-columns-3 ul.products .grid-master{ width: 50%; width: calc(50% - $shop_margin); } } @media only screen and (max-width: 1024px) { .products-list .layout-full.with-sidebar .content-box, .products-list .layout-full_fixed.with-sidebar .content-box, .products-list .layout-full_padding.with-sidebar .content-box{ width: 70%; width: calc(70% - $shop_margin); } } @media only screen and (max-width: 1000px) { /* edge layout columns */ /* 3 columns */ .woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products li.product, .woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products .grid-master{ width: 33.3333333%; width: calc(33.3333333% - $shop_margin); } } @media only screen and (max-width: 800px){ /* fluid layout columns */ /* 2 columns */ .woocommerce-page .layout-fluid.shop-columns-4 ul.products li.product, .woocommerce-page .layout-fluid.shop-columns-4 ul.products .grid-master, .woocommerce-page .layout-fluid.shop-columns-3 ul.products li.product, .woocommerce-page .layout-fluid.shop-columns-3 ul.products .grid-master{ width: 50%; width: calc(50% - $shop_margin); } /* fixed layout columns */ /* 2 columns */ .woocommerce-page .layout-fixed.layout-no-edge.shop-columns-4 ul.products li.product, .woocommerce-page .layout-fixed.layout-no-edge.shop-columns-4 ul.products .grid-master, .woocommerce-page .layout-fixed.layout-no-edge.shop-columns-3 ul.products li.product, .woocommerce-page .layout-fixed.layout-no-edge.shop-columns-3 ul.products .grid-master{ width: 50%; width: calc(50% - $shop_margin); } /* edge layout columns */ /* 2 columns */ .woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products li.product, .woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products .grid-master, .woocommerce-page .layout-edge.with-sidebar.shop-columns-3 ul.products li.product, .woocommerce-page .layout-edge.with-sidebar.shop-columns-3 ul.products .grid-master, .header-vertical.woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products li.product, .header-vertical.woocommerce-page .layout-edge.with-sidebar.shop-columns-4 ul.products .grid-master, .header-vertical.woocommerce-page .layout-edge.with-sidebar.shop-columns-3 ul.products li.product, .header-vertical.woocommerce-page .layout-edge.with-sidebar.shop-columns-3 ul.products .grid-master{ width: 50%; width: calc(50% - $shop_margin); } } @media only screen and (max-width: 768px) { .products-list .layout-full.with-sidebar .content-box, .products-list .layout-full_fixed.with-sidebar .content-box, .products-list .layout-full_padding.with-sidebar .content-box{ width: auto; margin-left: 0; margin-right: 0; } } @media only screen and (max-width: 700px){ /* edge layout columns */ /* 2 columns */ .woocommerce-page .layout-edge.shop-columns-4 ul.products li.product, .woocommerce-page .layout-edge.shop-columns-4 ul.products .grid-master, .woocommerce-page .layout-edge.shop-columns-3 ul.products li.product, .woocommerce-page .layout-edge.shop-columns-3 ul.products .grid-master{ width: 50%; width: calc(50% - $shop_margin); } } @media only screen and (max-width: 480px) { .content-box ul.products{ margin-right: 0; } .rtl .content-box ul.products{ margin-left: 0; } /* 1 column */ .woocommerce-page #mid ul.products li.product, .woocommerce-page #mid ul.products .grid-master{ width: 100%; /* we unify all possible options of bricks width */ } } /* ================== SHOP NO MAJOR PAGES ==================*/ .woocommerce-no-major-page .title-bar.outside{ $shop_nmp_title_bar_image $shop_nmp_title_bar_image_fit } .woocommerce-no-major-page .title-bar.outside .overlay-color{ $shop_nmp_title_bar_bg_color padding-top: $shop_nmp_title_bar_space_width; padding-bottom: $shop_nmp_title_bar_space_width; } .woocommerce-no-major-page .title-bar.outside .page-title, .woocommerce-no-major-page .title-bar.outside h2{ $shop_nmp_title_bar_title_color } .woocommerce-no-major-page .title-bar.outside .breadcrumbs, .woocommerce-no-major-page .title-bar.outside .breadcrumbs a, .woocommerce-no-major-page .title-bar.outside .breadcrumbs a:hover{ $shop_nmp_title_bar_color_1 } /* ================== SINGLE PRODUCT ==================*/ .single-product .title-bar.outside{ $product_title_bar_image $product_title_bar_image_fit } .single-product .title-bar.outside .overlay-color{ $product_title_bar_bg_color padding-top: $product_title_bar_space_width; padding-bottom: $product_title_bar_space_width; } .single-product .title-bar.outside .page-title, .single-product .title-bar.outside h2{ $product_title_bar_title_color } .single-product .title-bar.outside .breadcrumbs, .single-product .title-bar.outside .breadcrumbs a, .single-product .title-bar.outside .breadcrumbs a:hover{ $product_title_bar_color_1 } "; return $css; }