修改WooCommerce默认面包屑导航的函数woocommerce_breadcrumb_defaults()

代码

1
2
3
4
5
6
7
8
9
10
11
12
/*
修改Woo面包屑导航参数
*/
function my_woocommerce_breadcrumbs() {
return array(
'delimiter' => ' / ',
'wrap_before' => '<nav class="woocommerce-breadcrumb">',
'wrap_after' => '</nav>',
'home' => _x( 'XXXX', 'breadcrumb', 'woocommerce' ),
);
}
add_filter( 'woocommerce_breadcrumb_defaults', 'my_woocommerce_breadcrumbs' );