WordPress Schema Markup: How to Add It
There are two ways to add schema markup in WordPress: use a plugin, or paste JSON-LD by hand. This guide covers both so you can pick what fits your site — and avoid the most common mistake, duplicate markup.
Option 1 — Add WordPress schema markup by hand
This gives you full control. Generate the JSON-LD with one of our tools — Article, FAQ, Product or Local Business — and add the <script> snippet using any of these:
- A code-snippet plugin (e.g. WPCode) — paste the snippet and target specific pages.
- Your theme's header.php or a block in the template (best via a child theme).
- Google Tag Manager via a Custom HTML tag.
Option 2 — Use a schema markup plugin for WordPress
SEO plugins like Yoast, Rank Math and Schema Pro can output structured data automatically. They're convenient, but the markup is generic and you have less control over the exact properties. If you use one, don't also paste manual markup for the same type — that creates duplicates.
Avoiding duplicate schema
Duplicate or conflicting markup is the number-one WordPress schema problem, because themes and plugins both emit it. The fix: paste your live page's HTML into our schema markup validator to see every JSON-LD block already on the page before you add more.
Validate your markup
Whichever route you choose, validate with our checker and Google's Rich Results Test, and re-check after plugin or theme updates. For the fundamentals, see how to add schema markup and what is schema markup.
Need this done for you?
WebSensePro builds Shopify & WordPress SEO and schema markup implementations that earn rich results — done right, the first time. If you'd rather hand it off, we'll handle the structured data, technical SEO and the rest.