Schema Markup in WordPress Without Plugins: a Practical Guide

You don't need an SEO suite to get rich results. Here's how to add Organization, Article, Breadcrumb and FAQ schema to WordPress with a few lines of JSON-LD.

Schema markup tells Google what your content is — an article, a product, a local business — and unlocks rich results: stars, breadcrumbs, FAQ dropdowns, article carousels. SEO plugins sell this as a premium feature. In reality, it’s a handful of JSON-LD lines you can own outright.

How schema works in 2026

You add a <script type="application/ld+json"> block describing the page in Schema.org vocabulary. Google reads it during rendering. That’s the whole mechanism. JSON-LD is Google’s recommended format — no microdata attributes scattered through your HTML, just one clean block in the <head> or body.

Three rules before we start:

  1. Describe only what’s visibly on the page. Marking up reviews that don’t exist is a manual-action offense.
  2. Validate everything in the Rich Results Test.
  3. One graph beats many fragments — nest related entities with @graph.

The core set for a business site

Organization + WebSite (site-wide, output on the homepage)

add_action('wp_head', function () {
    if (!is_front_page()) return;
    $schema = [
        '@context' => 'https://schema.org',
        '@graph' => [
            [
                '@type' => 'Organization',
                '@id'   => home_url('/#org'),
                'name'  => get_bloginfo('name'),
                'url'   => home_url('/'),
                'logo'  => get_site_icon_url(512),
            ],
            [
                '@type' => 'WebSite',
                'url'   => home_url('/'),
                'name'  => get_bloginfo('name'),
                'publisher' => ['@id' => home_url('/#org')],
            ],
        ],
    ];
    echo '<script type="application/ld+json">' .
        wp_json_encode($schema, JSON_UNESCAPED_SLASHES) . '</script>';
});

BlogPosting (on single posts)

add_action('wp_head', function () {
    if (!is_singular('post')) return;
    $schema = [
        '@context' => 'https://schema.org',
        '@type' => 'BlogPosting',
        'headline' => wp_strip_all_tags(get_the_title()),
        'datePublished' => get_the_date('c'),
        'dateModified'  => get_the_modified_date('c'),
        'author' => ['@type' => 'Person', 'name' => get_the_author()],
        'image'  => get_the_post_thumbnail_url(null, 'large'),
        'mainEntityOfPage' => get_permalink(),
    ];
    echo '<script type="application/ld+json">' .
        wp_json_encode($schema, JSON_UNESCAPED_SLASHES) . '</script>';
});

Mirror your visible breadcrumbs as ListItem entries with positionnameitem. Google shows these instead of raw URLs in results — a small but free CTR win.

FAQPage — only where a real FAQ exists

Mark up genuine question/answer pairs that appear on the page. Since Google restricted FAQ rich results to authoritative sites, treat this as structure for AI answers rather than guaranteed dropdowns — it still helps machines quote you correctly.

What about LocalBusiness, Product, Service?

Same pattern: pick the most specific type that truly matches (e.g. Dentist rather than LocalBusiness), fill the properties you can verify on the page (address, phone, opening hours, price range), nest it under your Organization. Ten minutes per template, once.

Why not just use a plugin?

Yoast and Rank Math generate decent schema — along with everything else they load on every page of your site. If you already run one, fine: don’t double-output (two Organization blocks confuse parsers; test and keep one source of truth). But if schema is the only reason you keep a 2-MB SEO suite, you’ve just seen the replacement: ~40 lines of code, zero requests, zero subscription. It’s the same logic as the rest of our plugin replacement playbook.

Verify, then forget

Run the Rich Results Test on a post, the homepage and one landing page. Then check Search Console → Enhancements a week later to confirm Google picked everything up. Our Site Analyzer also detects which schema types a page exposes — handy for spot-checking any site, including competitors’.

Schema is the rare SEO task that’s genuinely set-and-forget. Do it once, in code you control, and every future page inherits it.

Is your site fast enough?

See exactly what's slowing your WordPress site down

Run a free technical audit — performance, SEO, security and Core Web Vitals.

Run free site audit