Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WooCommerce Product Schema appears under Yoast SEO Breadcrumbs in Google Structured Data Tool #10314
Please give us a description of what happened.
WooCommerce Product Schema appears under Yoast SEO Breadcrumbs.
Please describe what you expected to happen and why.
Only one Breadcrumb data would appear and WooCommerce Product Schema would appear on own line in Google Structured Data tool NOT combined with the Yoast SEO Breadcrumb schema.
How can we reproduce this behavior?
1.Add Yoast SEO Breadcrumbs to your site
2.Enable them in the SEO-Search Appearance-Breadcrumbs section. See that they appear
3.Create a WooCommerce Product
4.Run it through the structured data tool
5. See two Breadcrumb schema are identified.
6. The top set of Breadcrumb schema is from Yoast. The Yoast SEO Breadcrumb schema is highlighted in the source code
7. The bottom Breadcrumb schema is from WooCommerce. The WooCommerce breadcrumb schema is highlighted in the source code
8.See that the WooCommerce Product Schema is not highlighted under the WooCommerce Breadcrumbs
9.However, see that the WooCommerce Product Schema IS highlighted under the Yoast SEO Breadcrumbs
10.Disable Yoast SEO Premium
11.See WooCommerce Breadcrumbs and WooCommerce Product appear on their own individual lines
12.See WooCommerce Breadcrumbs highlight breadcrumb schema
13.See WooCommerce Product Highlight product schema
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
i. Yoast SEO WooCommerce breacrumbs are enabled
Rename the file to json-ld-woocommerce.php .
Copy the file to your theme or better child theme folder.
Call the code in your header.php of your theme by including it as shown here:
To make it easy download this file and copy paste this in your header as shown above.
Check in Google:
I'm not giving support, use it at your own risk.
Merry Christmas and happy new year 2019
Lots of moving parts here, so consolidating for simplicity.
Making this change will remove the ID collision, and resolve the conflicts. Nothing else should change/break.
A slight nuance
The main problem in this issue has been resolved by the fix in Yoast SEO: WooCommerce (Yoast/wpseo-woocommerce#294)
This will disable the WooCommerce breadcrumbs when the option is selected in the plugin.
To be able to provide the most optimal schema.org implementation for Products, the WooCommerce JSON+LD output needs to change, to make sure the identifier for a product is not the URL it is on.
This is being discussed in the above-mentioned issue.
If you do not own
Closing this in favor of: #12053
Support: Please determine if the problem for the customers that have been added to this issue has been fixed or if they need to be notified when closing #12053