Skip to content

Commit

Permalink
fix missing breadcrumb on product categories, tags and taxonomies
Browse files Browse the repository at this point in the history
  • Loading branch information
francgrasso committed Nov 2, 2020
1 parent a796025 commit cd2b445
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
12 changes: 5 additions & 7 deletions inc/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,6 @@ function yith_proteo_account_info_endpoint_content() {
wc_get_template( 'myaccount/proteo-account-info.php' );
}


/**
* Move breadcrumb on single product page
*/
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_breadcrumb', 0 );

/**
* Manage WooCommerce Tabs headings
*/
Expand Down Expand Up @@ -573,6 +566,11 @@ function yith_proteo_title_order_received( $title, $id ) {
*/
function yith_proteo_remove_breadcrumbs() {

if ( is_product() ) {
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_breadcrumb', 0 );
}

// Remove WooCommerce Breadcrumb on all Woo pages.
if ( 'no' === get_theme_mod( 'yith_proteo_breadcrumb_enable', 'yes' ) ) {
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );
Expand Down
6 changes: 5 additions & 1 deletion sass/shop/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ BREADCRUMBS
*/

.woocommerce-breadcrumb {
text-align: left;
text-align: center;
text-transform: uppercase;
font-size: 0.9375rem;
color: #9d9d9d;
Expand All @@ -519,6 +519,10 @@ BREADCRUMBS
}
}

nav.woocommerce-breadcrumb + header h1 {
margin-top: 0;
}

/**
ORDERING
*/
Expand Down
7 changes: 7 additions & 0 deletions sass/shop/_single-product.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
clear: both;
}
}
.woocommerce-breadcrumb {
text-align: initial;
}

.woocommerce-breadcrumb + h1 {
margin-top: 0;
}

.woocommerce-product-gallery {
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Author: YITH
Author URI: https://yithemes.com
Description: Proteo is a modern, fast and fully customizable WooCommerce theme. Designed and developed by YITH - a team of top developers of premium themes - with a beautiful UI, a minimal design and an optimized code, is perfect for each kind of site or shop. With the Proteo Wizard you can import our demo content with just a few clicks - in less than 2 minutes! - and easily customize it using the advanced front-end customizer. Proteo is the best solution if you want a complete WooCommerce theme that works perfectly also in mobile devices and start quickly to sell your products with WooCommerce without technical knowledge. Works perfectly with page builders like Elementor, Gutenberg & Visual composer. Key features: # WooCommerce Ready # Responsive with a perfect mobile design # Compatible with Elementor, Gutenberg, Visual Composer and others page builders # Translation Ready # Frontend customizer with hundred of options to customize header, footer, pages, typography, style, ecc. # Google fonts support # Regularly updated and improved with new demos and advanced features # Support to all YITH plugins. Check all our Proteo demos: https://proteo.yithemes.com/
Version: 1.3.13
Version: 1.3.14
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yith-proteo
Expand Down
14 changes: 12 additions & 2 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style.css.map

Large diffs are not rendered by default.

0 comments on commit cd2b445

Please sign in to comment.