There are two files you need look around if you want to change your breadcrumb's appearance in WooCommerce. You'll find those files in your WooCommerce plugin directory:
- The first file:
/woocommerce/woocommerce-template.php
, this file contains function definition forwoocommerce_breadcrumb()
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 thewoocommerce_breadcrumb()
function.
If you're going to change it's basic HTML structure such as its wrapper and delimiter, you only need to override the woocommerce_breadcrumb()
function in your functions.php
file. But if you're going to change its whole inner HTML structure, you'll need to override the template function. To do so, you need to copy the /woocommerce/templates/shop/breadcrumb.php
file to /woocommerce/shop/breadcrumb.php
in your theme directory
Howdy Zachthezman
I can't move the breadcrumb using your code above.
http://pastebin.com/fHdHqJh9
(sorry don't know the code on github to box code)
you can see here http://dev.downtherabbithole.co.uk/shop that the breadcrumb is not where I moved it
http://dev.downtherabbithole.co.uk/pr-disclosure as you can see here where it's meant to be.
Cheers