Yoast Duplicate Organization Schema: How to Find the Source and Merge the Nodes

A documented check of how Yoast builds its Organization node, why a second one appears, and a PHP filter that merges it.

By Oyekale Olawale · Updated November 2026

Quick answer

Yoast SEO writes one Organization node on every page, and that node always carries the same @id, which is your home URL followed by #organization. A true duplicate is a second Organization node with a different @id.

Find the source first. A theme, a second plugin, or a manually pasted script causes most cases, and switching that source off is the cleanest fix. If the extra node sits inside Yoast’s own graph, the filter in Step 3 merges it into the Yoast node and repairs every reference to it.

The filter in this guide was written against Yoast’s published Schema API and checked against a mock graph. Sections 3 and 4 explain what was tested and what was not.

Yoast SEO plugin interface used to manage the Organization schema that appears in the JSON-LD graph

How Yoast builds its schema graph

Yoast describes its output as one block of structured data on every page. According to the Yoast integration guidelines, that block describes the Organization, the WebSite, the WebPage and the primary entity of the page.

Each piece refers to the others by @id. The WebSite node lists the Organization as its publisher. The WebPage node uses isPartOf to point at the WebSite. The technology and approach page states that every page outputs all relevant pieces and connects them through these references.

The result is that an Organization block on an inner post is expected. A reader who finds ten Organization blocks on ten different URLs has found ten copies of one node.

PieceAppears onLink it carries
OrganizationEvery page, when the site represents an organizationReferenced by the WebSite publisher property
WebSiteEvery pagepublisher points to the Organization @id
WebPageEvery pageisPartOf points to the WebSite; breadcrumb points to the BreadcrumbList
BreadcrumbListPages that output breadcrumbsReferenced by the WebPage breadcrumb property

Yoast generates a Person node instead of an Organization node when the site representation setting names a person. A site that switched between the two settings can show both in cached output until caches are cleared.

What Google says about Organization markup

Google’s Organization structured data page recommends placing the markup on the home page or on one page that describes the organization, such as an About page. The same page states that the markup is not required on every page. It lists no required properties.

I found no Google documentation of a penalty for repeating the same Organization node across pages, and no Search Console report for duplicate Organization nodes. The practical concern is different. Two nodes with different @id values describe the same company as two entities, and a parser has no rule that joins them.

Google also notes in its site name documentation that the Rich Results Test does not support site names. Use the Schema Markup Validator at validator.schema.org to inspect raw JSON-LD instead.

Correct graph and duplicated graph

The diagram compares the two states. The left column shows the Yoast default. The right column shows the same page after another source adds a second Organization node.

Schema graph on one inner page
Expected: one Organization
Organization
@id /#organization
↑ publisher
WebSite
@id /#website
↑ isPartOf
WebPage
@id page URL
Duplicate: two Organizations
Organization
/#organization
Organization
/#/schema/org/1
↑ publisher (one node only)
WebSite
@id /#website
↑ isPartOf
WebPage
@id page URL
Red marks the node with a second @id. Nothing in the graph refers to it, so it stands alone.
1 per page
expected Organization nodes in Yoast output
/#organization
the @id Yoast gives that node
Schema API
filters documented since Yoast SEO 14.0
Different @id
the mark of a real duplicate

Why deleting the Organization piece is a poor fix

A common snippet removes the Organization graph piece with wpseo_schema_graph_pieces and an instanceof check. The Yoast Schema API documentation shows that exact pattern for the Breadcrumb piece, which makes it look safe for Organization as well.

One developer who used it on Organization noted that it breaks the referral chain. The Yoast Organization piece page explains why: if the node is not output, every entity that referenced it should drop that reference. The WebSite publisher would otherwise point at a node that no longer exists.

Merging is the safer operation. It keeps one node and rewrites each reference to it.

How I checked this guide

I did not reproduce the duplicate on a live WordPress site for this article, so the guide makes no claim about a particular Yoast version. The method was the following.

I read the Yoast developer documentation for the Schema API, the Organization piece, the integration guidelines and the technology page. I read Google’s Organization guidance. I then wrote the filter and ran it in PHP 8.3 on the command line against a mock graph, with the WordPress functions home_url() and trailingslashit() stubbed.

The test graph held a Yoast Organization node, a WebSite node, a second Organization node with a different @id and an extra sameAs property, an Article that referenced the second node, and a combined Person and Organization node. The filter removed the second node and copied sameAs to the kept node. It rewrote the Article reference and left the Person node alone. It returned the graph unchanged when no duplicate existed and when the Yoast node was absent.

Treat the filter as tested logic and run it on a staging copy before production. Hook behavior inside a full Yoast installation remains yours to confirm with the checks in Step 4.

Step 1: Find where the second node comes from

Open an inner post and view the page source. Every JSON-LD block is a script tag of type application/ld+json. Yoast marks its own block with the class yoast-schema-graph. A block without that class comes from another source.

Paste the snippet below into the browser console on the affected page. It lists each Organization node with the class of its script tag and its @id.

JavaScript, browser console
[...document.querySelectorAll('script[type="application/ld+json"]')].forEach((s, i) => {
  try {
    const d = JSON.parse(s.textContent);
    const nodes = Array.isArray(d) ? d : (d['@graph'] || [d]);
    nodes.forEach(n => {
      const t = [].concat(n['@type'] || []);
      if (t.includes('Organization')) {
        console.log('script ' + i, s.className || '(no class)', n['@id'] || '(no @id)', n.name || '');
      }
    });
  } catch (e) {
    console.warn('script ' + i + ': invalid JSON');
  }
});

Read the result with this table.

What the console showsLikely sourceAction
Two nodes in the Yoast block, different @idAn add-on or custom code that uses the Yoast Schema APIUse the filter in Step 3
A second block with no yoast-schema-graph classTheme, second schema plugin or a pasted scriptSwitch that source off (Step 2)
Same @id in both blocksTwo sources writing one entityRemove one source, or let Yoast hold the data (Step 3 variant)
Only one node on each pageNo duplicateNothing to fix

To read Yoast output more easily, the Yoast documentation offers the yoast_seo_development_mode filter, which pretty prints the schema. The documentation advises against leaving it active on a live site.

If the second block disappears when plugins are deactivated one at a time, the culprit is a plugin. My guide to WordPress plugin conflicts describes a safe order for that test on a staging site.

Step 2: Remove the second source

A schema consultancy audit tool documents the same advice for sites where Yoast and another plugin each describe the organization under different identifiers: switch schema output off in one of them. Reconciling both by hand is slower and breaks more often.

SourceWhat to doNotes
Theme with built-in schemaDisable the theme’s schema option, or remove the code in a child themeA theme change can reintroduce it. After moving a Kadence site between hosts, check again; the Solid Central migration fix covers a common migration error.
Second SEO or schema pluginTurn off its schema moduleSites that moved from another SEO plugin often keep old output. The Rank Math IndexNow 403 fix is useful if Rank Math is still installed.
Pasted script in a header or footer fieldDelete it, or reuse Yoast’s @id in itA WordPress.org support thread describes a manual head script that produced a second Organization in the testing tool.
Add-on that outputs its own OrganizationFollow the add-on’s settings, then use Step 3Yoast advises replacing a thinner node with a reference to its own.

Yoast’s integration guidelines give a rule for overlapping data. If the other output is less extensive than Yoast’s, replace it with a reference to the Yoast Organization. If it is more extensive, filter the Yoast output so that it includes that data. Step 3 follows the second option.

Need the other Yoast fix as well?

The AI Description Generator button can disappear after a plugin or theme change. The guide lists the causes and the repair order.

Read the Yoast AI button fix

Step 3: Merge the duplicate with a filter

Use this step when the extra Organization node sits inside the Yoast graph. The filter uses wpseo_schema_graph, which receives the finished graph array and the context object. The Yoast documentation lists this hook for changes that touch several parts of the output at once.

Place the code in a code snippets plugin or in a small custom plugin. Code added to the main theme’s functions.php disappears when the theme changes.

PHP, snippets plugin or custom plugin
<?php
add_filter( 'wpseo_schema_graph', 'w2k_merge_duplicate_org_nodes', 99, 2 );

function w2k_merge_duplicate_org_nodes( $graph, $context ) {
	if ( ! is_array( $graph ) ) {
		return $graph;
	}

	// Yoast's own Organization node uses this @id.
	$keep_id    = trailingslashit( home_url() ) . '#organization';
	$keeper_key = null;

	foreach ( $graph as $key => $node ) {
		if ( is_array( $node ) && isset( $node['@id'] ) && $node['@id'] === $keep_id ) {
			$keeper_key = $key;
			break;
		}
	}

	// Site represents a Person, or the node is absent: change nothing.
	if ( null === $keeper_key ) {
		return $graph;
	}

	$removed_ids   = array();
	$removed_nodes = array();
	$clean         = array();

	foreach ( $graph as $key => $node ) {
		if ( ! is_array( $node ) || $key === $keeper_key ) {
			$clean[ $key ] = $node;
			continue;
		}

		$types   = isset( $node['@type'] ) ? (array) $node['@type'] : array();
		$is_org  = in_array( 'Organization', $types, true ) && ! in_array( 'Person', $types, true );

		if ( $is_org ) {
			if ( ! empty( $node['@id'] ) ) {
				$removed_ids[] = $node['@id'];
			}
			$removed_nodes[] = $node;
			continue;
		}

		$clean[ $key ] = $node;
	}

	if ( empty( $removed_nodes ) ) {
		return $graph;
	}

	// Copy properties that the kept node lacks. Existing values are not replaced.
	foreach ( $removed_nodes as $dupe ) {
		foreach ( $dupe as $prop => $value ) {
			if ( 0 !== strpos( $prop, '@' ) && ! isset( $clean[ $keeper_key ][ $prop ] ) ) {
				$clean[ $keeper_key ][ $prop ] = $value;
			}
		}
	}

	// Point every reference to a removed node at the kept node.
	foreach ( $clean as $key => $node ) {
		if ( ! is_array( $node ) ) {
			continue;
		}
		array_walk_recursive(
			$node,
			function ( &$value, $prop ) use ( $removed_ids, $keep_id ) {
				if ( '@id' === $prop && in_array( $value, $removed_ids, true ) ) {
					$value = $keep_id;
				}
			}
		);
		$clean[ $key ] = $node;
	}

	return array_values( $clean );
}

What the filter does

The filter builds the expected Yoast @id from home_url(). If no node in the graph has that @id, it returns the graph unchanged. This covers sites whose representation is set to a person.

It then collects every node typed as Organization that does not carry the Yoast @id and does not also carry the type Person. Those nodes leave the graph. Any property that the kept node lacks is copied from them, so data such as sameAs survives.

The last loop walks every remaining node and replaces the removed @id values with the Yoast @id. An Article or WebPage that referred to the removed node now refers to the kept one.

Limits to know

The filter acts only on the Yoast graph. A separate script tag from a theme stays in the page, which is why Step 2 comes first. Subtypes such as LocalBusiness have a different @type value and pass through untouched.

If your source shows an Organization @id that differs from home_url() plus #organization, for example on a multilingual or multisite setup, change the $keep_id line to match the value you see in the page source.

Variant: let Yoast carry the richer data

When another source holds details that Yoast lacks, add them to the Yoast node and then switch the other source off. The Organization piece page documents the wpseo_schema_organization filter for this purpose.

PHP, add properties to the Yoast Organization node
add_filter( 'wpseo_schema_organization', 'w2k_enrich_yoast_org', 11, 2 );

function w2k_enrich_yoast_org( $data, $context ) {
	$data['legalName']   = 'Example Company Ltd';
	$data['description'] = 'One sentence that describes the organization.';
	return $data;
}

Replace the sample values with your own. After this change the single node carries the legal name and description, and the second source has nothing left to add.

✓ The merge filter
  • Keeps one node and repairs references
  • Preserves extra properties from the duplicate
  • Skips sites with no Yoast Organization node
  • Runs on every page without manual edits
✗ Where it falls short
  • Cannot remove a separate script tag
  • Needs a staging test on your Yoast version
  • The @id may differ on some setups
  • Hides the cause if the source stays active

Step 4: Verify the result

Clear every cache layer before testing: page cache, server cache and CDN. Cached HTML keeps serving the old JSON-LD until it is purged. A change in protocol or host can also alter the @id, so check the address after any SSL certificate change.

CheckExpected resultTool
Inner page, console snippetOne Organization node, class yoast-schema-graphBrowser console
WebSite publisherPoints to the Yoast Organization @idView source
Home pageOrganization node present with name, logo and sameAsView source
Raw JSON-LD syntaxNo errors reportedvalidator.schema.org
Google’s view of the pageRendered HTML contains the corrected markupSearch Console URL Inspection

Google’s documentation suggests deploying structured data on a few pages first and testing them with the URL Inspection tool. Use it on the home page and on two posts. Google publishes no fixed time for a recrawl, so the Search Console view can lag behind the live page.

Common mistakes

MistakeResultBetter approach
Removing the Organization piece entirelyWebSite publisher points to nothingMerge the nodes
Hard-coding an @id with the wrong protocol or hostThe filter finds no Yoast node and does nothingCopy the @id from page source
Fixing the Yoast graph while the theme still writes schemaDuplicate remains in a separate script tagRun the console check first
Testing a cached pageOld markup appears to persistPurge caches, then retest
Editing the parent theme’s functions.phpThe fix is lost after a theme updateUse a snippets plugin or custom plugin
Running the filter without a staging testAn unknown plugin interaction goes unnoticedTest on a copy of the site

A short note on content workflow

Structured data affects how search engines read a site, and content quality affects what they read. For a related view of how AI drafting fits into SEO work, see this guide to writing SEO articles with AI. Editors who build pages in Elementor may also meet the problem described in the Elementor AI history panel fix.

Keep your WordPress stack tidy

Duplicate schema, plugin conflicts and broken AI buttons often share one cause: overlapping plugins. The conflict guide gives a safe testing order.

Fix WordPress plugin conflicts

FAQ

Does Yoast output an Organization node on every page?

Yes. Yoast documents one block of structured data per page that describes the Organization, WebSite, WebPage and primary entity. The Organization node keeps the same @id on each page.

What counts as a duplicate Organization node?

A second Organization node on the same page with a different @id. The same node repeated on different pages with the same @id is the normal Yoast output.

Can I remove the Organization graph piece instead of merging?

The filter hook allows it, but the WebSite publisher reference then points at a missing node. The Yoast Organization documentation says references to an absent node should be removed. Merging avoids that work.

Will duplicate Organization nodes cause a Google penalty?

I found no Google documentation of a penalty or a Search Console report for this case. Google recommends Organization markup on the home page or one descriptive page and does not require it on every page.

Which Yoast versions support these filters?

Yoast states that its Schema API requires Yoast SEO 14.0 or higher. The filters used here belong to that API. Confirm the result on your own version with the checks in Step 4.

Where should I put the code?

Use a code snippets plugin or a small custom plugin. Code in a parent theme file is removed when the theme is replaced or updated.

Conclusion

One Organization node per page is the Yoast default, so the first task is to confirm that a second node with a different @id exists. The console snippet answers that in under a minute.

Switch off the extra source when it is a theme, a plugin or a pasted script. Use the merge filter when the extra node lives inside the Yoast graph. Test on staging, purge caches and confirm with the validator and URL Inspection.

Get Notified When New Reviews & Updates are Published

We don’t spam! Read our privacy policy for more info.