Created
December 7, 2014 08:00
-
-
Save bradleysa/e5bbf4aa7172d1f17530 to your computer and use it in GitHub Desktop.
WooCommerce: Remove default breadcrumbs and add Yoast ones instead
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 | |
/** | |
* WooCommerce: Remove default breadcrumbs and add Yoast ones instead | |
* Add to theme functions.php file or Code Snippets plugin | |
*/ | |
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0); | |
add_action( 'woocommerce_before_main_content','my_yoast_breadcrumb', 20, 0); | |
if (!function_exists('my_yoast_breadcrumb') ) { | |
function my_yoast_breadcrumb() { | |
yoast_breadcrumb('<p id="breadcrumbs">','</p>'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment