Schema for WooCommerce – Complete Guide with Examples

Schema.org markup (structured data) helps Google and other search engines better understand your store and your products. Implementing it correctly allows you to access rich results (rating stars, price, availability, breadcrumbs, FAQs, video snippets, etc.), improve visibility, and increase CTR.

Below you’ll find everything you need: formats, Schema types with examples (JSON-LD + Microdata), how to insert JSON-LD in WordPress, how to validate it, and which plugins to use.

 

What is Schema and why does it matter for an e-commerce?

Schema is a standardized way to declare what each part of a web page means (product, price, review, event, organization, etc.).

For an eCommerce site, the key benefits are:

  • Display price, stock, and ratings in search results.
  • Increase CTR thanks to visual rich snippets.
  • Make it easier for AI systems and search engines to extract accurate product data.
  • Improve the semantic interpretation of your catalog (Google “understands” your catalog better).

 

Formats to implement Schema on the web

1. JSON-LD — embedded JSON block (recommended)

It is placed as a <script type="application/ld+json">(it can go in <head>or <body>). It’s clean and easy to automate.

JSON-LD example (JSON only):

{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Running Shoes Pro X",
  "image": "https://mydomain.com/img/shoes.jpg",
  "description": "Lightweight sports shoes.",
  "sku": "ZPX-100",
  "brand": {
    "@type": "Brand",
    "name": "RUN FAST"
  }
}

 

2. Microdata — attributes inside HTML

Each visible element is annotated using itemscope, itemtype, and itemprop. It’s useful when you want the data to be directly associated with visual elements, but it can be harder to maintain on large sites.

Microdata example (HTML):

<div itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Running Shoes Pro X</h1>
  <img itemprop="image" src="https://mydomain.com/img/shoes.jpg">
  <p itemprop="description">Lightweight sports shoes.</p>
  <span itemprop="sku">ZPX-100</span>
  <span itemprop="brand">RUN FAST</span>
</div>

 

3. JSON-LD vs Microdata comparison

Criteria JSON-LD Microdata
Insertion <script> (head/body) Inline in HTML
Code cleanliness High ✅ Low ⚠️
Ease of automation High ✅ Medium 🟠
Recommended by Google Yes ✅ Supported 🟠
Useful for dynamic content / large catalogs Yes ✅ Less practical ⚠️

 

How to insert JSON-LD in WordPress (ready-to-use snippet)

Below is a snippet to insert dynamic JSON-LD into the <head>depending on the page. Place it in your theme’s snippets file or in a custom plugin (functions.phpor a small plugin).

Note: the code is designed for WooCommerce — it pulls product data when applicable.

<?php
add_action( 'wp_head', function() {
    if ( function_exists('is_product') && is_product() ) {
        global $product;
        if ( ! $product ) return;

        $schema = [
            '@context' => 'https://schema.org',
            '@type'    => 'Product',
            'name'     => $product->get_name(),
            'image'    => wp_get_attachment_url( $product->get_image_id() ),
            'description' => wp_strip_all_tags( $product->get_short_description() ?: $product->get_description() ),
            'sku'      => $product->get_sku(),
            'brand'    => [ '@type' => 'Brand', 'name' => $product->get_attribute('pa_brand') ?: 'Brand' ],
            'offers'   => [
                '@type'         => 'Offer',
                'url'           => get_permalink( $product->get_id() ),
                'priceCurrency' => get_woocommerce_currency(),
                'price'         => $product->get_price(),
                'availability'  => $product->is_in_stock() ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',
            ],
        ];

        echo '<script type="application/ld+json">' . wp_json_encode( $schema ) . '</script>';
    }
});

 

Essential Schema types (definition + JSON-LD + Microdata)

Below are all expanded and ready-to-use types. Each type includes a short definition and examples in JSON-LD and Microdata.

 

1. Product— the core of a product page

What it describes: name, description, images, SKU, brand, variants.

JSON-LD

{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Smart TV 55 UHD",
  "sku": "TV-55-UHD",
  "image": "https://mydomain.com/img/tv.jpg",
  "brand": { "@type": "Brand", "name": "Samsung" },
  "description": "4K HDR display with 120Hz."
}

 

Microdata

<div itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Smart TV 55 UHD</h1>
  <img itemprop="image" src="https://mydomain.com/img/tv.jpg">
  <span itemprop="sku">TV-55-UHD</span>
  <span itemprop="brand">Samsung</span>
  <p itemprop="description">4K HDR display with 120Hz.</p>
</div>

 

2. Offer— price, condition, and availability

What it describes: price, currency, availability, item condition.

JSON-LD

{
  "@context": "https://schema.org/",
  "@type": "Offer",
  "priceCurrency": "USD",
  "price": "799.00",
  "availability": "https://schema.org/InStock",
  "itemCondition": "https://schema.org/NewCondition"
}

 

Microdata

<div itemscope itemtype="https://schema.org/Offer">
  <meta itemprop="priceCurrency" content="USD">
  <span itemprop="price">799.00</span>
  <link itemprop="availability" href="https://schema.org/InStock">
  <link itemprop="itemCondition" href="https://schema.org/NewCondition">
</div>

 

3. AggregateRating— aggregated product rating

What it describes: average rating and review count (enables stars in SERP).

JSON-LD

{
  "@type": "AggregateRating",
  "ratingValue": "4.6",
  "ratingCount": "217"
}

 

Microdata

<div itemscope itemtype="https://schema.org/AggregateRating">
  <span itemprop="ratingValue">4.6</span>
  <span itemprop="ratingCount">217</span>
</div>

 

4. Review— individual reviews

What it describes: author, date, review content, and rating.

JSON-LD

{
  "@type": "Review",
  "author": "Juan Perez",
  "datePublished": "2025-06-12",
  "reviewBody": "Very good experience.",
  "reviewRating": { "@type": "Rating", "ratingValue": "5" }
}

 

Microdata

<div itemscope itemtype="https://schema.org/Review">
  <span itemprop="author">Juan Perez</span>
  <time itemprop="datePublished" datetime="2025-06-12">Jun 12, 2025</time>
  <p itemprop="reviewBody">Very good experience.</p>
  <div itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating">
    <span itemprop="ratingValue">5</span>
  </div>
</div>

 

5. BreadcrumbList— navigation breadcrumbs

What it describes: page navigation hierarchy (useful to show breadcrumbs in SERP).

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://mydomain.com" },
    { "@type": "ListItem", "position": 2, "name": "Shop", "item": "https://mydomain.com/shop" },
    { "@type": "ListItem", "position": 3, "name": "Smart TV 55 UHD", "item": "https://mydomain.com/product/tv-55" }
  ]
}

 

Microdata

<nav itemscope itemtype="https://schema.org/BreadcrumbList">
  <ul>
    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
      <a itemprop="item" href="https://mydomain.com/">
        <span itemprop="name">Home</span>
      </a>
      <meta itemprop="position" content="1">
    </li>
    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
      <a itemprop="item" href="https://mydomain.com/shop/">
        <span itemprop="name">Shop</span>
      </a>
      <meta itemprop="position" content="2">
    </li>
    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
      <a itemprop="item" href="https://mydomain.com/product/tv-55/">
        <span itemprop="name">Smart TV 55 UHD</span>
      </a>
      <meta itemprop="position" content="3">
    </li>
  </ul>
</nav>

 

6. FAQPage— Frequently Asked Questions

What it describes: Defines a page that contains a list of questions and answers related to a specific topic or product. Google can display these questions directly in search results as expandable rich snippets.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Does this product include a warranty?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, it includes a 12-month official warranty."
      }
    },
    {
      "@type": "Question",
      "name": "Do you offer international shipping?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, we ship worldwide using international carriers."
      }
    }
  ]
}

 

Microdata

<div itemscope itemtype="https://schema.org/FAQPage">
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <h3 itemprop="name">Does this product include a warranty?</h3>
    <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
      <p itemprop="text">Yes, it includes a 12-month official warranty.</p>
    </div>
  </div>

  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <h3 itemprop="name">Do you offer international shipping?</h3>
    <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
      <p itemprop="text">Yes, we ship worldwide using international carriers.</p>
    </div>
  </div>
</div>

 

7. HowTo— Step-by-step instructions

What it describes: Represents step-by-step instructions to complete a task. It can generate visual step snippets in Google Search.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "HowTo",
  "name": "How to install a WooCommerce plugin",
  "description": "Step-by-step guide to install a plugin in WooCommerce.",
  "step": [
    {
      "@type": "HowToStep",
      "name": "Download the plugin",
      "text": "Download the plugin ZIP file from the official website."
    },
    {
      "@type": "HowToStep",
      "name": "Upload the plugin",
      "text": "Go to WordPress admin → Plugins → Add New → Upload Plugin."
    },
    {
      "@type": "HowToStep",
      "name": "Activate the plugin",
      "text": "Activate the plugin from the plugins list."
    }
  ]
}

 

Microdata

<div itemscope itemtype="https://schema.org/HowTo">
  <h2 itemprop="name">How to install a WooCommerce plugin</h2>
  <p itemprop="description">Step-by-step guide to install a plugin in WooCommerce.</p>

  <div itemprop="step" itemscope itemtype="https://schema.org/HowToStep">
    <h3 itemprop="name">Download the plugin</h3>
    <p itemprop="text">Download the plugin ZIP file from the official website.</p>
  </div>

  <div itemprop="step" itemscope itemtype="https://schema.org/HowToStep">
    <h3 itemprop="name">Upload the plugin</h3>
    <p itemprop="text">Go to WordPress admin → Plugins → Add New → Upload Plugin.</p>
  </div>

  <div itemprop="step" itemscope itemtype="https://schema.org/HowToStep">
    <h3 itemprop="name">Activate the plugin</h3>
    <p itemprop="text">Activate the plugin from the plugins list.</p>
  </div>
</div>

 

8. Organization— Company / Brand information

What it describes: Defines official company data such as name, logo, website, and social profiles.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "LetsGoDev",
  "url": "https://www.letsgodev.com",
  "logo": "https://www.letsgodev.com/logo.png",
  "sameAs": [
    "https://twitter.com/letsgodev",
    "https://github.com/letsgodev"
  ]
}

 

Microdata

<div itemscope itemtype="https://schema.org/Organization">
  <span itemprop="name">LetsGoDev</span>
  <link itemprop="url" href="https://www.letsgodev.com">
  <img itemprop="logo" src="https://www.letsgodev.com/logo.png">
</div>

 

9. LocalBusiness— Physical store information

What it describes: Extends Organization to include physical location, opening hours, and contact details.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "LetsGoDev Store",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Main Street 123",
    "addressLocality": "Buenos Aires",
    "addressCountry": "AR"
  },
  "telephone": "+54-11-1234-5678",
  "openingHours": "Mo-Fr 09:00-18:00"
}

 

Microdata

<div itemscope itemtype="https://schema.org/LocalBusiness">
  <span itemprop="name">LetsGoDev Store</span>
  <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
    <span itemprop="streetAddress">Main Street 123</span>
    <span itemprop="addressLocality">Buenos Aires</span>
    <span itemprop="addressCountry">AR</span>
  </div>
  <span itemprop="telephone">+54-11-1234-5678</span>
</div>

 

10. Article— Blog posts and content pages

What it describes: Used for blog posts, guides, and articles to improve content understanding and appearance in SERPs.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to optimize WooCommerce SEO",
  "author": {
    "@type": "Person",
    "name": "Alex Gonza"
  },
  "datePublished": "2025-06-01",
  "image": "https://mydomain.com/article-cover.jpg"
}

 

Microdata

<article itemscope itemtype="https://schema.org/Article">
  <h1 itemprop="headline">How to optimize WooCommerce SEO</h1>
  <span itemprop="author">Alex Gonza</span>
  <time itemprop="datePublished" datetime="2025-06-01">June 1, 2025</time>
</article>

 

11. VideoObject— Video content

What it describes: Defines video metadata so Google can display video previews and rich snippets.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "WooCommerce setup tutorial",
  "description": "Learn how to set up WooCommerce step by step.",
  "thumbnailUrl": "https://mydomain.com/video-thumb.jpg",
  "uploadDate": "2025-05-10",
  "contentUrl": "https://mydomain.com/video.mp4"
}

 

Microdata

<div itemscope itemtype="https://schema.org/VideoObject">
  <span itemprop="name">WooCommerce setup tutorial</span>
  <meta itemprop="uploadDate" content="2025-05-10">
</div>

 

12. WebSite— Website entity and search

What it describes: Defines the website as an entity and can enable a sitelinks search box in Google.

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "LetsGoDev",
  "url": "https://www.letsgodev.com",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://www.letsgodev.com/?s={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}

 

Microdata

<div itemscope itemtype="https://schema.org/WebSite">
  <span itemprop="name">LetsGoDev</span>
  <link itemprop="url" href="https://www.letsgodev.com">
</div>

 

Google Search Console — where to view and validate structured data

In Search Console you can monitor and fix Schema errors. Useful paths:

  • Enhancements / Rich results / Structured data (varies by UI)
  • URL Inspection → shows detected structured data and errors

What to check:

  • Errors: missing required fields.
  • Warnings: recommended but optional data.
  • Valid pages: URLs eligible for rich results.

Always request validation after fixing issues.

 

Other tools to test Schema (detailed)

  • Rich Results Test: checks eligibility for Google rich results.
  • Schema Markup Validator: validates Schema syntax and structure.
  • Structured Data Testing Tool (if available): quick tests.
  • Browser extensions: inspect Schema directly from pages.

 

Recommended plugins — description and usage

Below are the most commonly used plugins and when each one is appropriate.

 

Yoast SEO

  • What it does: Generates basic schema (Article, WebSite, Organization) and FAQ/HowTo blocks in the editor.
  • Ideal for: Blogs and stores that want a stable solution without much configuration.
  • Free / Pro: The free version covers most needs; the premium version adds advanced SEO features and some specific helpers.

 

Rank Math

  • What it does: Generates JSON-LD for Product, FAQ, HowTo, Breadcrumbs, and allows extensive control from its dashboard.
  • Ideal for: Stores that want control without programming.
  • Free / Pro: The free version is very complete; the Pro version adds advanced modules and support for large-scale ecommerce.

 

Schema Pro

  • What it does: Allows creating custom schemas by content type with field mapping.
  • Ideal for: Those who need complex schema types or specific fields without writing code.
  • Free / Pro: Premium solution (paid only).

 

WooCommerce Product Schema (or specific extensions)

  • What it does: Provides schema focused on products and variations (better handling of AggregateOffer, variations, GTIN).
  • Ideal for: Large stores with many product variations.
  • Free / Pro: Some versions are free; the most complete ones are paid extensions.

 

Plugin Automatic JSON-LD Microdata Useful free version
Yoast SEO Yes Basic Yes
Rank Math Yes (advanced) Partial Yes
Schema Pro Yes (configurable) Yes No (paid)
WooCommerce extensions Yes (product-focused) Depends Partial

 

Practical strategies and Schema ↔ SEO relationship (summary)

Short version: Schema does not guarantee direct ranking improvements, but it provides signals that improve visibility and CTR, which indirectly impacts SEO and conversions.

Applicable strategies:

  • Product-first: Prioritize Product + Offer + AggregateRating on high-traffic product pages.
  • FAQ / HowTo: Add FAQs to product or support pages to obtain rich snippets that answer common questions.
  • Breadcrumbs: Implement BreadcrumbList to improve navigation and SERP appearance.
  • Enriched content: Add VideoObject for products with video (improves CTR in SERPs).
  • Automation: Generate dynamic JSON-LD from the store to avoid inconsistencies (prices, stock).
  • Continuous validation: Monitor Search Console and fix errors quickly.

 

Best practices and common mistakes

  • Do not invent ratings or reviews.
  • Avoid duplicating schema (if a plugin injects it, do not duplicate it with custom code).
  • Keep schema synchronized with real-time prices and stock.
  • Always validate before publishing using Rich Results Test and Schema Markup Validator.
  • Use JSON-LD by default and Microdata only when inline markup is required.

 

Implementing Schema in WooCommerce (or any website) is a low-cost, high-impact investment: it improves visibility, enables rich snippets, makes your products easier to consume by search engines and AI systems, and ultimately contributes to more clicks and sales.

Use JSON-LD to automate and maintain consistency, complement it with Microdata when needed, validate constantly, and rely on plugins (Rank Math / Yoast / Schema Pro) depending on the complexity of your store.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to Top
0
Would love your thoughts, please comment.x
()
x