I have a woocommerce site and storefront child theme.
I changed wc-template-functions.php file to have
if ( ! function_exists( 'woocommerce_breadcrumb' ) ) {
/**
* Output the WooCommerce Breadcrumb.
*
* @param array $args Arguments.
*/
function woocommerce_breadcrumb( $args = array() ) {
$args = wp_parse_args( $args, apply_filters( 'woocommerce_breadcrumb_defaults', array(
'delimiter' => '',
'wrap_before' => '<ul class="woocommerce-breadcrumb">',
'wrap_after' => '</ul>',
'before' => '<li>',
'after' => '</li>',
'home' => _x( 'Home', 'breadcrumb', 'woocommerce' ),
) ) );
$breadcrumbs = new WC_Breadcrumb();
if ( ! empty( $args['home'] ) ) {
$breadcrumbs->add_crumb( $args['home'], apply_filters( 'woocommerce_breadcrumb_home_url', home_url() ) );
}
$args['breadcrumb'] = $breadcrumbs->generate();
/**
* WooCommerce Breadcrumb hook
*
* @hooked WC_Structured_Data::generate_breadcrumblist_data() - 10
*/
do_action( 'woocommerce_breadcrumb', $breadcrumbs, $args );
wc_get_template( 'global/breadcrumb.php', $args );
}
}
I tried to apply a new css style in my breadcrumbs, through Additional CSS and all seemed ok.
But not all pages? posts? have the new styled breadcrumb.It exists only in pages with products.
Simple pages, Cart, Checkout do not accept my style. WHY?
All other pages have a vertical! breadcrumb
How to apply my css style to all
Thank you