Skip to content

Instantly share code, notes, and snippets.

Created May 2, 2017 04:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/a57680b3e80ea339cd03fe0c3a7e5232 to your computer and use it in GitHub Desktop.
<?php
/**
*Recommended way to include parent theme styles.
*(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
*/
add_action( 'wp_enqueue_scripts', 'clean_commerce_pro_child_style' );
function clean_commerce_pro_child_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/style.css',array('parent-style'));
}
/**
*Your code goes below
*/
add_filter( 'woocommerce_breadcrumb_home_url', 'clean_commerce_child_woo_custom_breadrumb_home_url' );
/**
* [clean_commerce_child_woo_custom_breadrumb_home_url Shop URL]
* @return [type] [Shop URL]
*/
function clean_commerce_child_woo_custom_breadrumb_home_url() {
$shop_url = get_permalink(wc_get_page_id( 'shop' ));
return $shop_url;
}
add_filter( 'woocommerce_breadcrumb_defaults', 'clean_commerce_child_woocommerce_breadcrumbs', 20 );
function clean_commerce_child_woocommerce_breadcrumbs() {
return array(
'delimiter' => ' &gt; ',
'wrap_before' => '<div id="breadcrumb" itemprop="breadcrumb"><div class="container"><div id="crumbs">',
'wrap_after' => '</div></div></div>',
'before' => '',
'after' => '',
'home' => get_the_title( wc_get_page_id( 'shop' ) ),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment