问题
I am using woocommerce plugin for one of my store with wordpress. Here its working fine. Now for the breadcrumbs it has already in built breadcrumb feature in it. Its working fine. Now I want the breadcrumb feature in my checkout page. But woocommerce shows breadcrumb in all pages except checkout page. So can someone kindly tell me how to solve this issue. Any suggestions will be really appreciable. Thanks.
回答1:
May be helpfull for you There are two files you need to change your breadcrumb's in WooCommerce. You'll find those files in your WooCommerce plugin directory
First Template file:
if ( ! function_exists( 'woocommerce_breadcrumb' ) ) {
/**
* Output the WooCommerce Breadcrumb
*
* @access public
* @return void
*/
function woocommerce_breadcrumb( $args = array() ) {
$defaults = array(
'delimiter' => ' › ',
'wrap_before' => '<div id="breadcrumb" itemprop="breadcrumb">',
'wrap_after' => '</div>',
'before' => '',
'after' => '',
'home' => null
);
$args = wp_parse_args( $args, $defaults );
woocommerce_get_template( 'shop/breadcrumb.php', $args );
}
}
The second file: /woocommerce/templates/shop/breadcrumb.php, it's the template file for breadcrumb component in WooCommerce. This is the template file that will be called by the woocommerce_breadcrumb() function.
来源:https://stackoverflow.com/questions/17564512/wordpress-woocommerce-show-breadcrumbs-in-checkout-page