enter image description here

I have installed an extension which puts Rich Cards on my product pages, however the default Magento structured data code for rich snippets is still present. How can I remove this from product pages?

3 Answers 3


This helps me to remove Magento default product schema by following steps.

1. Remove product schema from body. Add this to catalog_product_view.xml under your theme.

    <attribute name="itemtype" remove="true"/>
    <attribute name="itemscope" remove="true"/>

2. Remove aggregateRating

Copy this to your theme



itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"

3. Remove Review

Copy this to your theme



itemscope itemprop="review" itemtype="http://schema.org/Review"

Note: missing #2 and #3 will receive an error similar to below in validation due to action #1

“The review has no reviewed item specified.”
  • Whether it will remove the entire default schema.org? Or only remove review and aggregateRating
    – Jaisa
    Commented Apr 20, 2020 at 15:16

When I added remove='true' to these attributes - I got the following error:

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'attribute', attribute 'remove': The attribute 'remove' is not allowed.

To get these properties to disappear, I changed them to this instead:

<attribute name="itemtype" value="" />
<attribute name="itemscope" value="" />

Reference for the Solution:



You can remove the default schema.org from catalog_product_view.xml file. Add below the line of code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <attribute name="itemtype" value=""/>
    <attribute name="itemscope" value=""/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.