How to Add Schema Markup to WordPress Without Extra Plugins

This guide shows you how to add schema markup to a WordPress site using one small snippet you control. You won't need to install another heavy plugin. It is for small business owners and one-person sites who want clean structured data and are happy to copy, edit and paste a short block of code.

Do you need a schema plugin at all?

Most small WordPress sites don't need a dedicated schema plugin, because a few hand-written blocks of JSON-LD cover what they actually use.

Schema plugins often add settings pages, scripts and markup types you will never touch, and some of that loads on every page. A typical small business needs only a handful of types: your business details on the home page, articles on blog posts, and maybe products or opening hours. You can write each of those once and leave it alone.

Be realistic about what schema does. It helps search engines and AI tools understand your page. It does not guarantee rich results, rankings or a mention in an AI answer. Our guide to what schema helps with in AI search covers this in more detail.

Step 1: Check what your site already outputs

Before adding anything, find out what schema your site already outputs, because your theme or SEO plugin may already be producing some.

  1. Open your home page and one blog post in Google's Rich Results Test.
  2. Run the same pages through the Schema Markup Validator, which shows every type it finds, including ones Google doesn't use for rich results.
  3. View the page source and search for application/ld+json to see the raw blocks.
  4. Write down which types appear (for example Organization, WebSite, Article, BreadcrumbList) and which tool is adding them.

If your SEO plugin already covers articles and breadcrumbs, keep that. The aim is to fill gaps without duplicating anything.

Step 2: Decide which types you actually need

Add only the schema types that describe something real and visible on each page.

You can find the full list of types and properties at schema.org. For opening hours, including bank holidays, see opening hours schema done right.

Step 3: Add a small snippet to your site

The cleanest way to add your own schema is a short PHP snippet that prints JSON-LD into the page head, placed in a child theme or a tiny site-specific plugin.

Don't put it in your main theme's functions.php, because a theme update will wipe it. A child theme works. A safer option is a must-use plugin: a single PHP file in wp-content/mu-plugins/ that WordPress loads automatically. If editing files feels risky, a lightweight code snippets plugin is still far lighter than a full schema suite.

Here is an example for a plumber in Leeds, shown on the home page only:

<?php
/* Plugin Name: Site schema */
add_action( 'wp_head', function () {
    if ( ! is_front_page() ) {
        return;
    }
    $data = array(
        '@context'  => 'https://schema.org',
        '@type'     => 'Plumber',
        'name'      => 'Example Plumbing',
        'url'       => 'https://example.com/',
        'telephone' => '+44 113 496 0000',
        'address'   => array(
            '@type'           => 'PostalAddress',
            'streetAddress'   => '1 Example Street',
            'addressLocality' => 'Leeds',
            'postalCode'      => 'LS1 1AA',
            'addressCountry'  => 'GB',
        ),
    );
    echo '<script type="application/ld+json">'
        . wp_json_encode( $data, JSON_UNESCAPED_SLASHES )
        . '</script>';
} );

Change the type, name, address and phone to your own. Using wp_json_encode means WordPress handles quotes and special characters for you, which avoids the most common hand-coding errors. To target a different page, swap is_front_page() for something like is_page( 'contact' ).

Back up the site before you add the file. If something breaks, delete the file over FTP or your host's file manager and the site goes back to how it was.

Step 4: Test it and watch Search Console

Once the snippet is live, retest the page so you know the markup is valid and appears only once.

  1. Clear any caching plugin or host cache.
  2. Run the page through the Rich Results Test and the Schema Markup Validator again.
  3. Fix any errors. Warnings about optional properties can usually wait.
  4. Over the following weeks, check the enhancement reports in Search Console. Our Search Console walkthrough shows where to find them.

Google explains which types it supports and what it expects in its Search Central documentation, starting with the introduction to structured data. Requirements change from time to time, so treat that documentation as the final word.

Step 5: Keep it accurate

Schema only helps while it matches what the page says, so update the snippet whenever your details change.

If you move premises, change your phone number or adjust your hours, edit the snippet the same day you update the page and your Google Business Profile. Put a reminder in your calendar to recheck your key pages every few months, and again after any theme or plugin update.

Common mistakes

Frequently asked questions

Will schema markup improve my rankings?

Google has said structured data isn't a general ranking factor. It can make you eligible for rich results and helps machines understand your page, but nothing is guaranteed.

Is JSON-LD better than microdata?

Google supports both, and its documentation recommends JSON-LD because it sits in one block apart from your page design. That also makes it far easier to manage in WordPress.

Should I add FAQ schema to every page?

Usually not. Google stopped showing FAQ rich results for all sites in May 2026, so read whether FAQ schema is still worth it before you add it.

Can I remove my schema plugin after adding my own snippet?

Yes, but first check what it was outputting and recreate anything you still need. Then retest the main pages once it's gone.

This week, run your home page through the Schema Markup Validator and note what is already there. If your business details are missing or wrong, add the snippet above with your own information, test it, and set a reminder to check it again after your next update.

Next step: learn this with others

Last reviewed 2 November 2026. Back to the blog.