Structured Data Error on WooCommerce-generated pages
-
I am noticing a structured data error on the child pages of /product-category/ and /products/ –
(The property “mainContentOfPage” is not recognized by Google for an object of type WebPage.)
This appears to be untrue:
https://schema.org/WebPage
https://schema.org/mainContentOfPage– which is puzzling enough, but it’s also unclear from reviewing class-wp-structured-data.php how this schema is being constructed. For example, get_data_type_for_page() appears to generate schema types ‘website,’ ‘product,’ ‘review,’ ‘breadcrumblist,’ etc., but not ‘webpage.’
Is this WebPage schema actually being generated by WooCommerce, or is it simply a coincidence (or conflict with another plugin) that is generating this error on the WooCommerce /product-category/ and /products/ child pages?
If it is WooCommerce-generated, could anyone be so kind as to point us in the direction of the source code which generates this schema type, and a hook which we might use to customize/correct it?
The page I need help with: [log in to see the link]
- The topic ‘Structured Data Error on WooCommerce-generated pages’ is closed to new replies.