This support article briefly outlines the process of adding and configuring the Schema Filter created by Schema App. You can find the code and additional instructions on the GitHub overview page.
The Schema Filter is designed to remove unwanted or problematic markup coming from a source that cannot be disabled or easily removed. SchemaFilter can remove all major formats of schema markup including, Microdata, JSON-LD, and RDFa.
How To: Add and Configure the Schema Filter
Step 1: Add the following line of code to your website
Start by adding the SchemaFilter to your site with the following script tag.
Note: there will both other lines of script to add depending on the format and Types you are looking to remove. However, this must come before
Step 2: Identify the markup to be removed
Review the markup you want to remove to determine the format and Type of content you're looking to remove.
Microdata (most common)
Microdata uses attributes in the HTML like itemscope, itemtype, and itemprop to produce markup if you seeing attributes in your HTML that contain those attributes like the example below you have microdata.
Use the following lines of code to remove microdata. The first tag would remove all RDFa markup, the second tag would remove only Organization Type RDFa markup.
JSON-LD
JSON-LD is contained within script tags of type application/ld+json you will be able to spot them by looking for those type of scripts. One must be careful in removing JSON-LD with the filter because you can remove markup produced by Schema App since JSON-LD is the type of markup produced. Make sure to specify the exact schema types you want to remove, and that they are different from what you are deploying in Schema App. If the types are the same it is suggested that you contact your theme/plugin developer for instructions on removing that markup.
You can remove JSON-LD using the Schema Filter with the following examples. We do not recommend you remove all JSON-LD if you are going to deploying markup using a Schema App integration.
RDFa
RDFa can be identified by looking for property and typeof attributes in your HTML. If you are seeing these properties (example below) you will want to remove RDFa using the filter.
You can remove RDFa using the following snippet for the SchemaFilter. The first tag would remove all RDFa markup, the second tag would remove only Organization Type RDFa markup.
Note: Recommended solution is to have the markup removed. However, in scenarios where changes could take a long time, using above procedure is a good option.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article