Schema markup (structured data) describes your content to search engines in a machine-readable way: “this page is an article by this author”, “this is a product with this price and rating”, “this is our organization’s logo”. Google uses it to understand pages, and to show rich results: breadcrumbs, product details, review stars, and more. In WordPress, most of it can be generated automatically.

Google recommends JSON-LD: a <script type="application/ld+json"> block in the page, separate from the visible HTML:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Set Up a VPS Firewall",
  "datePublished": "2026-05-12T08:00:00Z",
  "dateModified": "2026-09-01T10:30:00Z",
  "author": { "@type": "Person", "name": "Jane Admin" },
  "publisher": { "@type": "Organization", "name": "Example", "logo": { "@type": "ImageObject", "url": "https://example.com/logo.png" } },
  "image": "https://example.com/wp-content/uploads/firewall.png"
}
</script>

Schema from SEO plugins (start here)

Yoast SEO, Rank Math, SEOPress and All in One SEO output a connected “graph” of schema on every page:

  • WebSite and Organization (or Person): set your organization name, logo and social profiles in the plugin settings.
  • WebPage and Article/BlogPosting for posts, with author and dates.
  • BreadcrumbList, if breadcrumbs are enabled.

Rank Math and others also offer per-post schema types (FAQ, HowTo, Product, Recipe, Event, and more), some in their paid versions.

WooCommerce outputs Product schema (price, availability, reviews) itself, and SEO plugins can extend it.

Common schema types

Type Use for Rich result
Article / BlogPosting Blog posts, news Better article understanding, Top stories (news)
Product + Offer + AggregateRating Product pages Price, availability, review stars
BreadcrumbList Site hierarchy Breadcrumb trail in results
Organization / LocalBusiness Home or about page Knowledge panel signals, logo
FAQPage Real FAQ sections Limited: Google now shows FAQ rich results mainly for authoritative sites
HowTo Step-by-step guides Rich results discontinued by Google, but still valid markup
Event, Recipe, JobPosting, Course Matching content Specialised rich results
SoftwareApplication Apps, tools Ratings, price

Rich result eligibility changes over time. Check Google’s Search Central documentation for current support.

Add custom JSON-LD

For content types your plugin doesn’t cover, add JSON-LD with a hook (in a site plugin or child theme):

add_action( 'wp_head', function () {
    if ( ! is_singular( 'case_study' ) ) return;
    $data = [
        '@context' => 'https://schema.org',
        '@type'    => 'CreativeWork',
        'name'     => get_the_title(),
        'url'      => get_permalink(),
        'dateModified' => get_the_modified_date( DATE_W3C ),
    ];
    echo '<script type="application/ld+json">' . wp_json_encode( $data, JSON_UNESCAPED_SLASHES ) . '</script>';
} );

Prefer the SEO plugin’s API or filters if it has them (Yoast and Rank Math both do), so your additions join their schema graph instead of creating disconnected duplicates. See WordPress hooks: actions and filters.

Rules that keep you out of trouble

  • Markup must match visible content. Don’t mark up reviews, FAQs or prices that users can’t see.
  • Avoid duplicate schema (theme + SEO plugin + another schema plugin all outputting Article). Check the page source, and disable extras.
  • Don’t use self-serving review markup (rating your own business on your own site) for LocalBusiness or Organization: Google ignores it.
  • Keep dates accurate: dateModified should change only when the content really changes.

Test it

  • Rich Results Test (Google): shows which rich results a page is eligible for, plus errors.
  • Schema Markup Validator (schema.org): validates all schema types.
  • Search Console → Enhancements: site-wide reports for products, breadcrumbs and more, with errors over time.

From the command line, a quick check that JSON-LD is present:

curl -s https://example.com/some-post/ | grep -o '"@type":"[A-Za-z]*"' | sort | uniq -c

Quick reference

Task How
Base schema SEO plugin (Organization, WebSite, Article, Breadcrumbs)
Products WooCommerce + SEO plugin
Custom types wp_head JSON-LD, or the SEO plugin’s filters
Test Rich Results Test, Schema Markup Validator
Monitor Search Console → Enhancements

Related: WordPress sitemap and WordPress custom post types.

  • WordPress
  • SEO
  • Structured Data