diff --git a/includes/class-wc-breadcrumb.php b/includes/class-wc-breadcrumb.php index df89d31ca68..34348c1a45b 100644 --- a/includes/class-wc-breadcrumb.php +++ b/includes/class-wc-breadcrumb.php @@ -221,7 +221,6 @@ class WC_Breadcrumb { $_name = $product_post_type->labels->singular_name; } - $this->prepend_shop_page(); $this->add_crumb( $_name, get_post_type_archive_link( 'product' ) ); } diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index d3c2d189c87..ed153ca640c 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -1198,7 +1198,7 @@ if ( ! function_exists( 'woocommerce_breadcrumb' ) ) { */ function woocommerce_breadcrumb( $args = array() ) { $args = wp_parse_args( $args, apply_filters( 'woocommerce_breadcrumb_defaults', array( - 'delimiter' => ' / ', + 'delimiter' => ' / ', 'wrap_before' => '', 'before' => '', diff --git a/readme.txt b/readme.txt index f47a9bc2f05..6af5604accb 100644 --- a/readme.txt +++ b/readme.txt @@ -149,6 +149,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Fix - Stock status when updating out of stock product. * Fix - Fix place order button text on init. * Fix - When duplicating products, handle entities. +* Fix - Double shop page in breadcrumb and white space issues. * Tweak - Added DOMDocument item in the System Status as a requirement. * Tweak - Simplify default mode should be 'standard'. * Tweak - Set attribte 'query_var' true when public. diff --git a/templates/global/breadcrumb.php b/templates/global/breadcrumb.php index 50293e9d8b6..4a5cfed0e14 100644 --- a/templates/global/breadcrumb.php +++ b/templates/global/breadcrumb.php @@ -11,30 +11,29 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } -?> - +if ( $breadcrumb ) { - + echo $wrap_before; - $crumb ) : ?> + foreach ( $breadcrumb as $key => $crumb ) { - + echo $before; - - ' . esc_html( $crumb[0] ) . ''; ?> - - - + if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) { + echo '' . esc_html( $crumb[0] ) . ''; + } else { + echo esc_html( $crumb[0] ); + } - + echo $after; - - - + if ( sizeof( $breadcrumb ) !== $key + 1 ) { + echo $delimiter; + } - + } - + echo $wrap_after; - +} \ No newline at end of file