I at the moment have this code in my features file for the WooCommerce plugin..
operate my_theme_wrapper_start()
{
echo the_breadcrumb();
echo '<part function="predominant"><div class="wrap">';
}
operate my_theme_wrapper_end()
{
echo '</div></part>';
}
operate mytheme_prepare_woocommerce_wrappers()
{
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action( 'woocommerce_before_main_content', 'my_theme_wrapper_start', 10 );
add_action( 'woocommerce_after_main_content', 'my_theme_wrapper_end', 10 );
}
add_action( 'wp_head', 'mytheme_prepare_woocommerce_wrappers' );
add_theme_support( 'woocommerce' );
Now I want to reposition the WooCommerce breadcrumb outdoors of the part.predominant class, but I can not see how to do that. Is there a approach to do that?
That is the code I’ve for the WooCommerce breadcrumb…
operate woocommerce_breadcrumb( $args = array() ) {
$defaults = apply_filters( 'woocommerce_breadcrumb_defaults', array(
'delimiter' => ' / ',
'wrap_before' => '<nav class="bcrumb" >',
'wrap_after' => '</nav>',
'earlier than' => '',
'after' => '',
'house' => _x( 'Residence', 'breadcrumb', 'woocommerce' ),
) );
$args = wp_parse_args( $args, $defaults );
woocommerce_get_template( 'store/breadcrumb.php', $args );
}
I’ve tried placing the part.predominant tag within the ‘earlier than’ line, however this solely provides a piece tag within the breadcrumb, it doesn’t reposition the breadcrumb.