Learn

How to fix duplicate schema from your WordPress theme and Yoast

When a page prints the same schema type twice, one source is redundant. This walkthrough uses the schema checker to list types, find the extra block, switch it off with documented options, and confirm the result.

By Adem ÇakalPublished 3 sources6 min read
Short answer

Run the page through the schema checker, list the types it outputs, and look for a type that appears twice, such as two Organization or two Article blocks. The second copy usually comes from a theme, a second plugin or a hand-pasted snippet. Turn off one source using that source's own setting, and re-run the checker. Google's guidelines tell you to describe visible content and the page's main focus; we found no Google statement about a penalty for a repeated type.

Step 1: list the types on each page

  1. Pick one page of each kind: home page, a post, a product or service page, and one page with an FAQ.
  2. Enter each URL in the schema checker and write down every type it reports.
  3. Mark any type that appears more than once. Two Organization entries, two Article entries or two FAQPage entries are the usual signs.

For a quick second opinion without a tool, count the types in the raw HTML. This works on minified JSON-LD:

curl -s https://example.com/sample-post/ | grep -oE '"@type": ?"[A-Za-z]+"' | sort | uniq -c | sort -rn

A count of 2 on Article, Organization or WebSite is worth a closer look. Some repeats are normal, since one graph can hold several Person or ImageObject items, so judge by whether two blocks describe the same thing.

Step 2: find where the second copy comes from

Three places schema can be printed into a WordPress page head: the SEO plugin, the theme, and a second plugin or pasted snippet SEO plugin graph Theme template Second plugin or snippet One page, severalJSON-LD blocks
Keep one writer per type. Each extra writer is a chance for conflicting values.
SourceHow to tellHow to remove
SEO plugin (Yoast)One combined graph block with several linked itemsYoast documents a filter that turns its schema off entirely, and one that removes single pieces
ThemeA separate JSON-LD block, or microdata attributes in the markup, that stays when plugins are offLook in the theme's own settings or documentation; the option name varies by theme
Second pluginBlock disappears when you deactivate it on a staging copyUse that plugin's own schema setting, or deactivate it
Pasted snippetBlock appears in a template, header setting or custom HTML widgetDelete the snippet; keep the plugin's version

To isolate the source, switch themes or deactivate plugins one at a time on a staging copy and re-run the checker after each change. The block that vanishes tells you who wrote it. Do not test on a live site you cannot roll back. These identification tips are our own troubleshooting method, not an official procedure.

Step 3: remove the extra source with its official switch

Prefer a setting inside the tool that prints the extra block. Only when you intend to remove Yoast's output, Yoast's developer documentation describes two filters. This turns off all of its schema:

<?php
add_filter( 'wpseo_json_ld_output', '__return_false' );

This one removes only a single graph piece, using the example Yoast gives for breadcrumbs:

<?php
add_filter( 'wpseo_schema_graph_pieces', 'remove_breadcrumbs_from_schema', 11, 2 );
function remove_breadcrumbs_from_schema( $pieces, $context ) {
    return array_filter( $pieces, function( $piece ) {
        return ! $piece instanceof \Yoast\WP\SEO\Generators\Schema\Breadcrumb;
    } );
}

Put code like this in a small site-specific plugin, not in a theme you may replace. Yoast notes that its REST API field yoast_head_json still contains schema after the first filter. If the duplicate comes from the theme or another plugin, do not disable Yoast to hide it; fix the one that should not be writing.

A worked example (invented)

This example is invented, not a real site. A checker run on a blog post lists: Organization twice, Article twice, BreadcrumbList once. Viewing the page source shows one block carrying a connected graph with ids, and a second block with no ids and the same site name. Deactivating the second plugin on a staging copy removes the second block, so that plugin is the extra writer. You switch off its schema setting, leave the SEO plugin alone, clear caches and re-run: Organization once, Article once, BreadcrumbList once. Record the before and after counts for each sample page so a later plugin update that brings a duplicate back is easy to spot.

Step 4: verify again

  1. Clear page and plugin caches, so you are not reading an old copy.
  2. Re-run the schema checker on the same sample pages and compare types with your first list.
  3. Confirm the entities you meant to keep are still there, such as Organization on the home page and Article on posts.
  4. Check that markup still matches what visitors see, which is the rule in Google's general guidelines.

FAQ markup is the type most often duplicated. Since Google ended FAQ rich results, see what to do with FAQ markup. For adding markup properly in the first place, read adding schema in WordPress.

Questions people ask

Will Google penalize duplicate schema?

We found no Google statement saying so. Its guidelines require markup to describe visible content and the page's main focus. Duplicates still risk conflicting values, so remove the redundant source.

Is two of the same type ever correct?

Yes. One graph can hold several items of one type, such as multiple people or images. The problem is two blocks describing the same entity.

Should I disable Yoast schema entirely?

Only if another source is meant to own the output. Disabling it removes the connected graph Yoast builds, so replacing it needs care.

Can the checker see schema added by JavaScript?

Check what the tool says it reads. Raw HTML counts, such as the curl command above, show only what the server sends before scripts run.

Sources

  1. Yoast developer documentation: Schema API, accessed 2026-11-12.
  2. Google Search Central: General structured data guidelines, accessed 2026-11-12.
  3. Google Search Central: Introduction to structured data, accessed 2026-11-12.