– I use latest versions of themes and plugins as much as I can. Yoast is auto-updated in the free version (now 11.0).
Unfortunately my theme is a little bit outdated around 3 month. It’s the famous Divi theme. So it’s probably not related to that point. I also us a basic child theme for it.
– On most pages I use the shortcode implemented using the Divi theme builder with an archive builder plugin (Layout injector for Divi).
For Woocommerce only :
I replaced the default WooCommerce breadcrumb with the Yoast one using this code :
// Remove WooCommerce Breadcrumbs
remove_action( 'init', 'woocommerce_breadcrumb', 20 );
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20 );
//Add Yoast Breadcrumbs
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>');
}
}
As you can see, nothing should brake the breadcrumb. And the strangest part is that it happens on both Blog and WooCommerce archives with both implementation approaches (shortcode & function).
To be more precise :
– WooCommerce breadcrumb is missing “first” category, while sub-category is displayed without its top category before it. And when On a top category Archive, this one is not displayed either, leaving an empty breadcrumb.
> https://www.lemaitreantiques.com/boutique/categorie/petits-objets/eventails/
> https://www.lemaitreantiques.com/boutique/categorie/petits-objets/
– On the blog page it’s the opposit. sub-category is missing but not top category. but when in the top category, it is once again not displayed.
> https://www.lemaitreantiques.com/histoires/mobilier/
> https://www.lemaitreantiques.com/histoires/
All this resulting both in displaying only one Category > Top-category OR sub-category, depending on the archive type (and breadcrumb implementation way).
I disabled the “No Category Base” plugin and the breadcrumb function but the issue remained on the blog archives for what I’ve seen.