In Shopify, theme creators often create schema.org markup in their template files. There is often room for improvement in the schema markup and there are apps, such as Schema App’s Shopify App, that do that with JSON-LD syntax. However, this can leave you with two Products listed in Structured Data Testing Tools and Structured Data Reports. Below, is how we would recommend you to remove your Shopify theme’s schema.org microdata.
Note: While a non-technical person can do this and you can restore your theme files from prior versions, it’s still possible to break your pages in the editor.
1. Navigate to the Theme Editor
Login to your Store Admin area. In the navigation menu, 1) choose Online Store, 2) choose the Actions button, then 3) Edit HTML/CSS. Now, you’ll be viewing the Theme Editor.
2. Find the Product.liquid Template file
From the Theme Editor, search for the Product template, select it so it shows up in the editor panel. Next, you will look for the schema.org microdata and remove the relevant attribute values.
3. Remove itemscope, itemtype, itemprop attributes / values
In most cases, microdata shows up in HTML elements as attributes of an element that is shown to the user. The other cases are meta and link elements, described later.
So, as you can see above in the highlights, the first place you will find itemscope is in the first line, with the <div … /> element. You would remove the itemscope, while occasionally you may have an empty value, such as itemscope=”” which also goes. Next, itemtype=”http://schema.org/Product” would be removed. The attribute itemtype with its value that’s encapsulated in double quotes.
The next highlighted section are two meta tags. First, we identify the meta tags to remove by it having an itemprop attribute. These are different than other HTML elements in that the whole element should be removed. Link Elements would be the same, the whole element is removed.
Here are a few more examples of elements with microdata. The h3 would lose the itemprop=”brand”, the h1 would lose the itemprop=”name” and similar for div / offers. The meta and link elements are also identified by their itemprop and they will be removed. You know the end of the element by the trailing “>”.
4. Repeat Search and Removing Attributes
Continue looking for and removing the attributes throughout the product.liquid template. There is a search function that you can use, by placing the cursor in the file editor, then pressing Ctrl+F or Cmd+F.
5. Preview Changes, Confirm then Save
When you’re done, preview the changes and if you’ve confirmed all is well, save the changes. Later, if you must you can rollback the version.