Schema Markup Guide: JSON-LD for Rich Results – BuiltToWinWeb
EN ES FR DE IT PT ZH JA KO RU NL
← Back to all articles

Schema Markup Guide: JSON-LD for Rich Results (2026)

I’m Jacob Campbell, and structured data is no longer optional. Google now uses schema to understand entities, and sites with rich snippets earn roughly double the click-through rate on average. Yet over 70% of small-business sites have no schema markup at all. This guide covers every type you’ll need — with copy-paste JSON-LD, implementation strategies, dynamic PHP generation and real results.

Key facts

  • — CTR with rich results
  • JSON-LD — Google’s pick
  • 8 — High-value types
  • 70% — Sites with none = your edge

Why schema matters for SEO (the business case)

Schema markup doesn’t directly raise rankings. But it unlocks rich results — star ratings, FAQ accordions, product prices, event dates and breadcrumbs shown right in the SERP. These visually prominent listings get clicked far more than plain blue links, and the higher CTR sends positive engagement signals to Google that can lift rankings indirectly.

The data: a Search Engine Journal study found FAQ schema raised CTR 12–15%. LocalBusiness schema with star ratings lifted CTR 20–30%. For ecommerce, Product schema raised click rates by up to 40% in shopping results.

JSON-LD vs Microdata vs RDFa — always choose JSON-LD

There are three ways to add schema:

  • JSON-LD (Google’s preference) — one script block in the <head> or <body>. Clean, doesn’t clutter your HTML, easy to maintain.
  • Microdata — embeds attributes directly in HTML tags. Messy and verbose.
  • RDFa — similar to Microdata, but more complex.

Always use JSON-LD. It’s easier to generate dynamically, doesn’t break your HTML, and Google explicitly recommends it.

The 8 most valuable schema types for small businesses

  • 1. Organization — brand identity. Put it on your homepage so Google associates your logo, social profiles and legal name.
  • 2. LocalBusiness — essential for any business with a location or service area. Shows address, phone, hours and star ratings in the local pack.
  • 3. FAQPage — accordion Q&A expands right in the results; your listing takes 2–3× the vertical space of a normal one.
  • 4. Product — shows price, availability and reviews in Google Shopping and standard results.
  • 5. BreadcrumbList — replaces the raw URL with a clickable path (Home > Services > Web Design); improves CTR and site-structure understanding.
  • 6. Article / BlogPosting — lets posts appear in the Top Stories carousel; requires author, publish date and image.
  • 7. HowTo — step-by-step instructions with images in the results, perfect for “how-to” content.
  • 8. Event — shows date, time, location and ticket availability for webinars, workshops or local events.

How to add schema without breaking your site

  1. Write your JSON-LD inside a <script type="application/ld+json"> tag.
  2. Place it in the <head> (best for crawling) or end of <body> (also fine).
  3. Validate with Google’s Rich Results Test.
  4. After deploying, monitor Search Console → Enhancements for errors.

A copy-paste FAQPage example:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{
    "@type": "Question",
    "name": "How long does a divorce take in Florida?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "An uncontested divorce can finalize in about 4 weeks; contested cases take longer."
    }
  }]
}
</script>

Automated schema for PHP sites — dynamic generation

For sites with hundreds of products or posts, generate schema dynamically. A complete PHP function for Product schema:

<?php
function product_schema(array $p): string {
    $data = [
        '@context'    => 'https://schema.org',
        '@type'       => 'Product',
        'name'        => $p['name'],
        'image'       => $p['image'],
        'description' => $p['description'],
        'offers'      => [
            '@type'         => 'Offer',
            'price'         => $p['price'],
            'priceCurrency' => 'USD',
            'availability'  => 'https://schema.org/InStock',
        ],
    ];
    return '<script type="application/ld+json">'
         . json_encode($data, JSON_UNESCAPED_SLASHES)
         . '</script>';
}

Call it in your template loop and every product ships valid structured data automatically.

Testing and troubleshooting — tools and common mistakes

Testing tools:

  • Rich Results Test — shows which rich snippets you’re eligible for.
  • Schema.org validator — checks syntax and required properties.
  • Search Console → Enhancements — live errors after deployment.

Common mistakes and fixes:

  • Missing required properties — e.g. Article needs author, headline, datePublished. Check the schema.org spec.
  • Relative URLs — always use absolute URLs (include https://).
  • Mismatched @id references — if you reference an entity, make sure it exists.
  • Schema that doesn’t match visible content — Google can penalise fake reviews or prices not on the page.
  • Unclosed script tag — leaving the JSON-LD <script> open produces malformed HTML.

Case study: from 8% CTR to 21% CTR with schema

A family-law firm in Florida had a WordPress site with no schema. Its practice-area pages averaged 8% CTR on mobile. We added:

  • LocalBusiness schema on the homepage with aggregateRating (4.8 stars from 24 Google reviews).
  • FAQ schema on every practice-area page (e.g. “How long does a divorce take in Florida?”).
  • BreadcrumbList schema on every page.

Results after 60 days:

  • Average mobile CTR on practice-area pages: 8% → 21%.
  • Position for “divorce lawyer Orlando” improved from #14 to #6 (CTR jumped from 6% to 29%).
  • Organic calls from search: +134%.

The firm now appears with star ratings and FAQ accordions, dominating competitors who still show plain blue links.

Advanced: combine multiple types with @graph

Instead of separate script blocks, you can combine schema types in one with @graph — cleaner, and it helps Google’s entity resolution:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    { "@type": "Organization", "@id": "https://example.com/#org", "name": "Your Business" },
    { "@type": "WebSite", "url": "https://example.com", "publisher": { "@id": "https://example.com/#org" } }
  ]
}
</script>

Sources &amp; further reading

Related services

Frequently asked questions

Does schema markup improve rankings?

Not position directly, but it makes you eligible for rich results that significantly raise CTR at the same rank — which can lift rankings indirectly.

Which schema format should I use?

JSON-LD. It’s cleaner, easier to generate dynamically, and Google explicitly recommends it over Microdata and RDFa.

What are the highest-ROI schema types?

For most small businesses: LocalBusiness, FAQPage and BreadcrumbList. Ecommerce should add Product; publishers should add Article.

Can I combine multiple schema types?

Yes — use @graph to put several entities in one script block, which also helps Google’s entity resolution.

Can schema get me penalised?

Only if it doesn’t match visible content — e.g. fake reviews or prices not on the page. Accurate markup is safe.

How much does a custom PHP site cost?

Three flat-fee packages: a business pro site at $1,750, an ecommerce site at $5,600, and SaaS / web apps at $10,000 — all one-time, no monthly fees.

Do you add schema to existing sites?

Yes — I can add LocalBusiness, FAQ and Breadcrumb schema to an existing site for a flat fee, with results typically visible within 30 days.

Ready to add schema to your site?

I implement schema on every custom PHP site I build — and can add LocalBusiness, FAQ and Breadcrumb schema to an existing site for a flat fee. You’ll typically see higher CTR, more calls and a ranking bump within 30 days.

Get my free quote