1

We are using a theme which unfortunately relies on Microdata like: <div itemscope itemtype="http://schema.org/Article">

We would like to use JSON-LD instead, however, a theme is constantly updated by the company which created it, and updating it after Microdata removal would take too much time and labor. I wondered if there is a tag which would say "ignore Microdata", so it could stay as it is and we could include our JSON-LD snippet without modifying a whole template.

curious
  • 791
  • 2
  • 12
  • 27

1 Answers1

0

There is no way to convey that the Microdata should be ignored.

In the ideal case, you would give the Microdata and the JSON-LD items that are about the same thing the same URI (itemid in Microdata, @id in JSON-LD).

<div itemscope itemtype="http://schema.org/Article" itemid="#the-article">
</div>

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Article",
  "@id": "#the-article"
}
</script>

That way, supporting consumers can learn that these items describe the same thing, i.e., there are not two articles, only one, and properties added to one item are also relevant for the other item.

If that’s not possible, you could try to "destroy" the Microdata without making the document invalid. You could do this with a script, after each release of a new version of the theme. Simply remove every itemtype attribute. Your document will still keep the Microdata, but it’s no longer using a vocabulary, so the structured data will likely not be re-used.

unor
  • 92,415
  • 26
  • 211
  • 360