SEO & AI search · Guide
How to Add Schema Markup to WordPress
Short answer
To add schema markup to WordPress, use Yoast SEO or Rank Math to add it for you, or paste a JSON-LD block into the page head. First set whether your site stands for a person or an organization, then pick the type that matches each page, such as Article for posts. Last, run the page through the Rich Results Test and fix any errors it lists.
Key takeaways
- Schema markup is structured data that labels what a page is, such as an article, a product, or a business.
- JSON-LD is the format Google recommends, and it sits in a script tag that visitors never see.
- Yoast SEO adds WebPage schema to pages and Article schema to posts by default.
- Rank Math adds schema through its Schema tab and Schema Generator on each post or page.
- Markup must describe content that is visible on the page, or Google may ignore it.
- A valid result in the Rich Results Test means a page is eligible for a rich result, not that Google will show one.
What is schema markup in WordPress?
Schema markup is structured data that tells search engines what a page is, such as an article, a product, or a business.
Google Search Central defines structured data as a standard format for giving information about a page and sorting its content, with examples such as recipe ingredients, cooking time, and temperature. Intro to How Structured Data Markup Works
Schema.org supplies the shared vocabulary that most search markup uses, and Google treats its own docs as the final word on how Search reads that markup. Schemas
Google lists case studies on its intro page. Rotten Tomatoes added markup to 100,000 pages and saw a 25% higher click rate on marked-up pages, while Nestle pages shown as rich results had an 82% higher click rate.
The same page reports that Food Network converted 80% of its pages and saw a 35% rise in visits. Rakuten found that users spent 1.5x more time on pages with markup and had a 3.6x higher interaction rate on AMP pages with search features.
What do you need before you add schema markup?
You need a live WordPress site, admin access, and the facts that belong on each page, such as names, dates, and prices.
Start with this short list before you open any settings.
- An admin account, so you can install plugins and change SEO settings.
- One SEO plugin that adds schema, such as Yoast SEO or Rank Math, not two at once.
- A list of your main pages and the type each one needs, such as Article for posts.
- Your business name, logo, and social profile links, if the site stands for a business.
- A backup of the site, so you can undo a change that breaks a page.
Pick one source of markup before you start, because two plugins that both add schema can print the same type twice.
Check what your site already outputs. View a page source and search for “application/ld+json”, which is the script type used for JSON-LD blocks.
How do you add schema markup with Yoast SEO?
Yoast SEO adds most schema markup for you once you set your site details, so you rarely need to write code.
Follow these steps in order.
- Install and activate the plugin, then open “Yoast SEO” in the left menu and click “Settings”.
- Open “Site representation”, choose “Person” or “Organization”, and add your name or organization name, logo, and social profiles.
- Check the defaults under “Search Appearance”. Yoast describes pages with “WebPage” schema and posts with “Article” schema.
- Open a post or page, open the Yoast SEO sidebar, open the “Schema” tab, and pick the “Page type” or “Article type” that fits the content.
- Save the post or page, then view it on the front end to confirm it still looks right.
Yoast builds one connected graph from these pieces instead of printing separate blocks for each item, and it adds schema for breadcrumbs too. Implementation Guide
If you have not installed the plugin yet, follow our Yoast SEO setup guide.
For each setting on that screen, see our Yoast SEO settings guide.
How do you add schema markup with Rank Math?
Rank Math adds schema through its Schema module, with a default type per post type and a Schema Generator on each post.
Follow these steps in order.
- Go to “Rank Math SEO” and open “Dashboard”, then turn on the “Schema (Structured Data)” module.
- Go to “Rank Math SEO”, open “Titles & Meta”, open the “Posts” tab, set “Schema Type” to “Article”, and save.
- Repeat step 2 for pages, with “WebPage” as the default type for pages.
- Edit a post, open the Rank Math panel, open the “Schema” tab, and click “Schema Generator”.
- Pick the type that matches the content, click “Use”, fill in the fields that apply, and save the post.
Rank Math lists over 20 built-in schema types and 193 Local Business types in its knowledge base, plus a Custom Schema Builder in the PRO version.
If you have not installed the plugin yet, follow our Rank Math setup guide.
For the full list of schema options, see our Rank Math schema settings guide.
How do you add schema markup by hand with JSON-LD?
You can add schema by hand by pasting a JSON-LD script block into the page head, with no plugin at all.
Google supports 3 formats: JSON-LD, Microdata, and RDFa. It recommends JSON-LD because the markup stays separate from visible text and nested items are easier to express.
Use this Organization block as a starting point, and replace each value with your own facts.
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Example Bakery",
"url": "https://example.com",
"logo": "https://example.com/logo.png",
"sameAs": [
"https://example.com/about"
]
}
The “@context” line names the vocabulary, which is Schema.org. The “@type” line names the kind of thing the page describes, which is an Organization here. Organization
Put the block on the page it describes, inside a script tag with the type “application/ld+json”. Google can read JSON-LD in the head or the body of a page.
Developers can print the block with the “wp_head” hook, which WordPress Developer Resources describes as printing scripts or data in the head tag on the front end. wp_head Hook
Keep every value true to the visible page. Do not add a phone number, address, or price that the page itself does not show.
Which schema type should you use for each page?
Match the type to the main purpose of the page, and use the most specific type that fits.
| Page | Type to use | Main fields |
|---|---|---|
| Home page | Organization | name, url, logo |
| Blog post | Article | headline, author, datePublished |
| Product page | Product | name, price, availability |
| Business location page | LocalBusiness | name, address, openingHours |
| Every page in a hierarchy | BreadcrumbList | position, name, item |
Google advises using the most specific type and property names from Schema.org for your markup. General Structured Data Guidelines
A post about a product still needs Product schema for the product part, not Article schema alone, if the page is mainly a product page. Pick the type that matches what the reader came for.
Article schema and FAQ schema have their own guides, so this guide covers only the general choice here. Use the type for the page in front of you, and add a second type only when it also describes visible content on that page.
How do you check that your schema markup works?
Run the live page through the Rich Results Test, then check the same page in the Schema Markup Validator.
Follow these steps for each main page type.
- Open the Rich Results Test, paste the page URL, and run the test.
- Read the detected items, fix errors first, and then fix warnings about missing optional fields.
- Open the Schema Markup Validator, paste the same URL or code, and look for unknown properties or wrong types.
- Fix the issue at its source, in the plugin settings or in your code, and run the test again.
Google says the Rich Results Test is an easy tool for validating structured data, and in some cases for previewing a feature in Search. Rich Results Test
The Schema Markup Validator checks markup against the whole Schema.org vocabulary, so it can catch a misspelt property that the Rich Results Test does not list. Schema Markup Validator
Google says you must include all required properties for an object to be eligible for enhanced display. A valid result means the page is eligible, not that it will show a rich result.
After markup passes, watch how the page appears in search and in AI answers. Our guide to checking ChatGPT citations explains one way to check the second part.
How long does schema markup take to show in search results?
Schema markup does not show at once, because Google must crawl the page again, and a rich result may never appear even for valid markup.
Allow at least a few days after you publish a change, then recheck the page instead of adding more markup on top of the first block.
Google says to check markup with the Rich Results Test during development and with rich result status reports after deployment, because pages can break after deployment due to template or serving issues.
A rich result is an enhanced display, not a promise. Google decides whether to show one, based on the page, the query, and the quality of the markup.
If a page still shows no rich result after a recrawl, check the status reports in Search Console for that type. Fix the errors they list, and leave valid pages alone.
What mistakes should you avoid?
Avoid marking up content that readers cannot see, adding fake reviews, and running two schema plugins at once.
- Marking up hidden content. Google says not to mark up content that is not visible to readers of the page.
- Adding fake reviews or ratings. Only mark up reviews that real users wrote and that the page shows.
- Using the wrong type. A woodworking page that labels instructions as a recipe is one example in the guidelines for irrelevant markup.
- Leaving out required properties. Items that miss required properties are not eligible for rich results.
- Printing the same markup twice. Turn off schema in your theme if your SEO plugin already adds it.
- Blocking Googlebot. Do not block a marked-up page with robots.txt or a noindex tag.
Google lists these rules in its general structured data guidelines, and a breach can cost a page its rich result eligibility. A structured data manual action means the page loses that eligibility, though it does not change how the page ranks.
If you run Yoast SEO and Rank Math together, pick one for schema. Our settings comparison guide shows how their settings differ.
Frequently asked questions
Does schema markup help a page rank higher?
No, schema markup does not raise a page in the rankings on its own. Google uses it to understand a page and to decide if it can show a rich result, such as a price or a breadcrumb path. A manual action for bad markup removes rich result eligibility, but Google says it does not change how the page ranks in web search.
Can I use Yoast SEO and Rank Math together for schema markup?
No, you should pick one plugin to add schema markup. Two plugins can print the same type twice, and a theme can add a third copy on top of that. Turn off schema output in the plugin or theme you do not use, then test one page to confirm only one block remains.
Do I need schema markup on every page of my site?
No, you need it on pages where the type adds meaning, such as posts, product pages, and your home page. Start with your home page, your main service or product pages, and your most visited posts. Add it to the rest of your pages over time, in the same way, rather than rushing to cover every page at once.
What is the difference between JSON-LD and Microdata?
JSON-LD is a block of JSON in a script tag, separate from the visible text on the page. Microdata adds attributes to the HTML tags around the visible text itself. Google supports both formats, plus RDFa, but it recommends JSON-LD because it is easier to write, read, and maintain.
Will schema markup guarantee a rich result in Google Search?
No, valid markup only makes a page eligible for a rich result. Google decides whether to show one for a given query, and it may show nothing even when the markup passes every test. Keep the markup accurate and complete, then check the rich result status reports in Search Console to see what Google found.
Can I add schema markup without a plugin?
Yes, you can paste a JSON-LD block into the page head by hand, or print it with the wp_head hook from a child theme or a small custom plugin. The block must use the Schema.org vocabulary, match the visible content on the page, and include every required property for its type. Test the page after you add it.
Sources
- Intro to How Structured Data Markup Works Google Search Central
- General Structured Data Guidelines Google Search Central
- Schema SEO with Yoast SEO: Implementation Guide Yoast
- Organization Schema.org
- Schemas Schema.org
- wp_head Hook WordPress Developer Resources
- Rich Results Test Google Search Central
- Schema Markup Validator Schema.org
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
