Created
May 2, 2017 04:55
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' => ' > ', | |
'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