Schema markup is one of the highest-ROI changes you can make to a WordPress site. It takes 10 minutes to add, costs nothing, and makes your content eligible for rich results in Google Search — star ratings, FAQs, product prices, and more.
This guide covers three ways to add schema markup to WordPress, from the fastest (AI generator) to the most flexible (manual JSON-LD).
Schema markup is structured data — code you add to your pages that tells Google what your content is about. Not just what the words say, but what type of content it is: a local business, a product, an FAQ, a blog post.
Google uses this data to power rich results: enhanced listings in search that show extra information directly in the results page. A WordPress site with schema can show:
Without schema, Google has to guess. With it, you tell Google exactly what to display.
The fastest way to add schema markup to any WordPress page is to generate the JSON-LD with a tool and paste it directly into your page's <head>.
Go to SchemaGenerator.app, paste your WordPress page URL, and click Generate Schema. The AI reads your page and automatically extracts the relevant fields — your business name, address, opening hours, or article headline depending on your content type.
Review the output, edit anything needed, and copy the JSON-LD snippet.
You have a few options for where to paste the code:
Option A — Using a plugin (recommended for non-developers)
Install WPCode. Go to Code Snippets → Add Snippet, paste your JSON-LD, set location to "Header", and activate.
Option B — Using Yoast SEO or RankMath
Both plugins have a "Schema" tab in the page editor. You can use their built-in schema options, or add custom JSON-LD via their custom code fields.
Option C — Using Elementor or other page builders
Add an HTML widget anywhere on the page and paste the JSON-LD <script> tag. Note: this places it in the body, not the head — Google accepts body placement too.
The JSON-LD looks like this:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Your Business Name",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "City",
"postalCode": "12345"
},
"telephone": "+1-555-000-0000",
"openingHours": "Mo-Fr 09:00-17:00"
}
</script>
If you're already using Yoast SEO, RankMath, or Schema Pro, these plugins can auto-generate schema markup for your WordPress content types.
Yoast adds basic Organization, WebSite, and Article schema automatically on install. To configure:
Limitation: Yoast's schema is decent for basics but limited on rich schema types like Product or detailed LocalBusiness.
RankMath has more granular schema control:
RankMath's free version covers most schema types. The pro version adds rich snippets and schema validation.
Schema Pro is a dedicated schema plugin (paid, ~$79/yr). It's the most complete option if schema is a priority:
For developers or sites with custom themes, you can add schema markup directly to your WordPress theme files.
function add_schema_markup() {
if ( is_front_page() ) {
echo '<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Your Business",
"url": "' . get_site_url() . '"
}
</script>';
}
}
add_action( 'wp_head', 'add_schema_markup' );
Tip: Use a child theme to avoid losing changes on theme updates.
| Method | Best for | Time to set up |
|---|---|---|
| AI generator + paste | Any WordPress site, any schema type | 5 minutes |
| Yoast / RankMath | Sites already using these plugins | 10–15 minutes |
| Schema Pro | Sites needing schema across all content types | 30 minutes |
| functions.php / header.php | Developers with custom requirements | 20 minutes |
For most WordPress sites, the fastest path is: generate the JSON-LD with SchemaGenerator.app, then paste it using WPCode. You get full control over the output and you're done in under 10 minutes.
After adding schema to WordPress, validate it:
Does adding schema to WordPress improve my rankings?
Schema is not a direct ranking factor but it enables rich results, which increase click-through rates. More clicks at the same position = more organic traffic. For local businesses, schema also reinforces signals used in Maps rankings.
Can I add schema to specific pages only?
Yes. Using a plugin like WPCode, you can use display rules to show schema on specific pages, post types, or categories. Or generate the JSON-LD for each page individually and paste it into that page's head section.
Is WooCommerce Product schema handled automatically?
WooCommerce adds basic Product schema by default, but it's incomplete — it often misses aggregateRating, brand, and offers properties that Google requires for rich results. Use a dedicated schema generator to produce a complete Product JSON-LD and add it alongside WooCommerce's output.
What's the best free schema plugin for WordPress?
For most sites: RankMath (free tier covers the main schema types) paired with a generator for custom schema. For pure JSON-LD control with no plugin overhead: generate with SchemaGenerator.app and paste via WPCode.
Generate your WordPress schema now — SchemaGenerator.app. No account required, valid JSON-LD in seconds.