block. Works for one-off schemas (Event for a specific landing page, JobPosting for a careers page). Don't use this approach site-wide \u2014 maintenance nightmare." } }, { "@type": "Question", "name": "Why is Schema Pro showing errors on validator but my page looks fine?", "acceptedAnswer": { "@type": "Answer", "text": "Validator errors often indicate missing required fields that Google would silently fail to use for rich results. Common cause in WordPress: Article schema missing 'datePublished' because the post is a 'page' not 'post' type and Schema Pro uses post date by default. Configure schema mapping per content type." } }, { "@type": "Question", "name": "Should I use JSON-LD or Microdata in WordPress?", "acceptedAnswer": { "@type": "Answer", "text": "JSON-LD. Google recommends it, it's cleaner, it doesn't pollute HTML. WordPress SEO plugins universally output JSON-LD now. Only use Microdata if you're maintaining a legacy implementation that depends on it." } }, { "@type": "Question", "name": "How do I add custom fields to existing plugin schemas?", "acceptedAnswer": { "@type": "Answer", "text": "Yoast SEO: yoast_pieces filter to modify schema graph. Rank Math: rank_math/json_ld filter. AIOSEO: aioseo_schema_output filter. All three plugins expose hooks to add/remove/modify schema fields. Add to a child theme functions.php or a code-snippets plugin." } } ] }, { "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://aiwebpageseo.com/seo-audit-platform.html" }, { "@type": "ListItem", "position": 2, "name": "Learning Hub", "item": "https://aiwebpageseo.com/learning-hub.html" }, { "@type": "ListItem", "position": 3, "name": "JSON-LD Checker Fixes", "item": "https://aiwebpageseo.com/aipageseo-demo-pages/json-checker-fixes-index.html" }, { "@type": "ListItem", "position": 4, "name": "Fix JSON-LD in WordPress (Schema Output & Validation)", "item": "https://aiwebpageseo.com/aipageseo-demo-pages/how-to-fix-json-ld-wordpress.html" } ] } ] }
/ JSON-LD Checker Fixes / Fix JSON LD WordPress

How to Fix JSON-LD in WordPress (Schema Output & Validation)

WordPress sites running multiple SEO/schema plugins frequently output conflicting or duplicate JSON-LD blocks โ€” Yoast outputs an Article, Schema Pro outputs another Article with different fields, AIOSEO adds a third. Search engines pick one or get confused. This guide covers WordPress-specific JSON-LD debugging. Pair with JSON Checker guide and AI Schema fixes.

Step 1: Audit current JSON-LD output

View source on a published post. Search for 'application/ld+json'. Count blocks (should be 1-3 maximum). List @type values present.

Step 2: Run Rich Results Test

search.google.com/test/rich-results. Enter URL. Note: detected schemas, errors, warnings. Most WordPress sites have 1-3 schema types detected and 0-5 warnings.

Step 3: Identify plugin conflicts

If you have multiple SEO/schema plugins (Yoast + Schema Pro, Rank Math + AIOSEO), they're likely both outputting overlapping schemas. Choose one as the schema authority and disable schema output in the others (each plugin has a toggle).

Step 4: Fix invalid syntax

Validator errors like 'invalid JSON' usually mean: HTML inside JSON-LD (extra
, unencoded quotes), wrong @type values, or missing required fields. Locate the source plugin and either configure it correctly or replace.

Step 5: Resolve @id collisions

When multiple plugins output schemas with the same @id, search engines reject them. Fix: pick one plugin, disable others' schema output. Or set unique @id prefixes per plugin if you must run both.

Step 6: Add missing required fields

Each schema type has required fields. Article needs: headline, image, datePublished, author. Product needs: name, image, offers. Recipe needs: name, image, recipeIngredient, recipeInstructions. Validate per-type via Schema.org docs.

Step 7: Monitor in Search Console

Search Console โ†’ Enhancements โ†’ per schema type. Errors and warnings reported there. Watch for new errors after plugin updates.

Frequently Asked Questions

Why is my WordPress site outputting multiple Article schemas?
Almost always: running two SEO plugins simultaneously. Yoast outputs Article. Schema Pro outputs Article. Rank Math outputs Article. Pick one plugin to own schema; disable schema output in the others. Most plugins have a 'disable schema' toggle deep in advanced settings.
Can I write custom JSON-LD in a Gutenberg block?
Yes, use the Custom HTML block and paste your block. Works for one-off schemas (Event for a specific landing page, JobPosting for a careers page). Don't use this approach site-wide โ€” maintenance nightmare.
Why is Schema Pro showing errors on validator but my page looks fine?
Validator errors often indicate missing required fields that Google would silently fail to use for rich results. Common cause in WordPress: Article schema missing 'datePublished' because the post is a 'page' not 'post' type and Schema Pro uses post date by default. Configure schema mapping per content type.
Should I use JSON-LD or Microdata in WordPress?
JSON-LD. Google recommends it, it's cleaner, it doesn't pollute HTML. WordPress SEO plugins universally output JSON-LD now. Only use Microdata if you're maintaining a legacy implementation that depends on it.
How do I add custom fields to existing plugin schemas?
Yoast SEO: yoast_pieces filter to modify schema graph. Rank Math: rank_math/json_ld filter. AIOSEO: aioseo_schema_output filter. All three plugins expose hooks to add/remove/modify schema fields. Add to a child theme functions.php or a code-snippets plugin.

๐Ÿ“ Validate WordPress JSON-LD

Find duplicate schemas, missing fields and syntax errors.

Run JSON-LD Validator โ†’
Related Guides: JSON Checker Guide  ยท  All JSON-LD Fixes  ยท  Use AI Schema in WordPress  ยท  Debug Schema in WordPress
๐Ÿ’ฌ Got a problem?