Back to blog
Web Development

How to Add Schema Markup to Your Website Without a Plugin

Add schema markup by hand with JSON-LD: choose the right types, match visible content, link entities with @id, and validate without relying on a plugin.

AdminOctober 19, 202612 min read2 views
How to Add Schema Markup to Your Website Without a Plugin

How to Add Schema Markup to Your Website Without a Plugin

Schema plugins are convenient until they output markup you did not ask for, conflict with your theme's own markup, or disappear in an update. Writing it yourself takes less code than most people expect and gives you complete control over what search engines see. Schema markup is structured data, written using the shared Schema.org vocabulary, that describes the entities on a page, such as an organization, an article, a product, or a local business, in a machine-readable format so search engines can interpret them precisely and, where eligible, show rich results.

Quick Answer: To add schema markup without a plugin, write a JSON-LD script using Schema.org types, place it inside a script tag with type application/ld+json in your page's head or body, and fill it with values that match the visible content. Validate it with Google's Rich Results Test before and after publishing.

What Schema Markup Is and Why JSON-LD Is the Right Format

Schema markup tells search engines what your content means, not just what it says. A page might display "4.8" and "Acme Plumbing," but structured data states explicitly that Acme Plumbing is a LocalBusiness with a specific address, phone number, and opening hours. Schema.org itself was launched in 2011 as a joint project by Google, Microsoft (Bing), and Yahoo, with Yandex joining later, which is why the same vocabulary works across major search engines.

There are three syntaxes for writing structured data: JSON-LD, Microdata, and RDFa. Google's documentation recommends JSON-LD because it lives in a single script block separate from your visible HTML, which makes it easier to write, maintain, and generate from templates. Microdata and RDFa require adding attributes throughout your markup, which couples SEO data to your design and breaks easily during redesigns. Schema also works best as part of a broader on-page SEO audit, because it reinforces signals your titles, headings, and content should already be sending.

A few terms make the rest of this guide easier. A type is the kind of thing you are describing, such as Organization or Article. A property is an attribute of that type, such as name, url, or datePublished. @context declares the vocabulary, always https://schema.org. @id gives an entity a unique identifier so you can reference it from other blocks. Rich results are enhanced search listings, such as review stars, product prices, or breadcrumbs, that Google may show when markup is valid and the page is eligible.

One expectation to set early: Google has stated that structured data is not a direct ranking factor. Its value comes from helping search engines understand your content and from making eligible pages more visually prominent, which can improve click-through.

Step-by-Step: Adding JSON-LD Schema by Hand

The manual process is the same on any platform, from static HTML to a custom CMS or a JavaScript framework. Follow these steps in order.

  1. Pick the types that match your pages. Most sites need Organization (or LocalBusiness) and WebSite globally, BreadcrumbList on inner pages, and one content type per template, such as Article for blog posts, Product for product pages, or Event for event listings.
  2. Check Google's documentation for each type. Google's Search Central structured data gallery lists required and recommended properties for every supported rich result. Schema.org lists far more properties than Google uses, so start from Google's list.
  3. Write the JSON-LD. Create a script element with type="application/ld+json" and a JSON object containing @context, @type, and the properties. Use absolute URLs and ISO 8601 dates.
  4. Match visible content exactly. Every value you mark up, such as a price, rating, author, or address, must appear on the page for users. Hidden or invented values violate Google's guidelines.
  5. Place the script in the page. Google reads JSON-LD in either the head or the body. The head is conventional for global types; per-page types can sit near the content they describe.
  6. Connect entities with @id. Give your Organization an @id such as your homepage URL plus #organization, then reference it as the publisher of every Article instead of repeating the details.
  7. Template it. Turn the hand-written block into a template that pulls values from your CMS fields or page data, so every new page gets correct markup automatically.
  8. Validate. Paste the code or URL into Google's Rich Results Test to check rich result eligibility, and into the Schema Markup Validator at validator.schema.org to check general vocabulary correctness.
  9. Monitor in Search Console. After deployment, the Enhancements section reports valid items, warnings, and errors per rich result type over time.

Here is a minimal Article example you can adapt. Values in a real implementation come from your page data:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Add Schema Markup Without a Plugin",
  "datePublished": "2026-10-19T09:00:00Z",
  "dateModified": "2026-10-19T09:00:00Z",
  "author": { "@type": "Person", "name": "Jane Doe", "url": "https://example.com/about/jane" },
  "publisher": { "@id": "https://example.com/#organization" },
  "image": "https://example.com/images/schema-cover.webp",
  "mainEntityOfPage": "https://example.com/blog/schema-markup"
}
</script>

In React or Next.js, render the same object with JSON.stringify inside a script tag using dangerouslySetInnerHTML, and escape any < characters in the serialized string as \u003c so user-supplied text cannot break out of the script element.

Common Schema Types and When to Use Each

Choosing the right type matters more than adding many types. This table covers the types most websites actually need and what Google currently does with them.

Schema typeWhere to use itKey propertiesSearch feature it supports
Organization / LocalBusinessHomepage or global templatename, url, logo, address, telephone, openingHours, sameAsKnowledge panel signals and local business details
BreadcrumbListEvery page below the homepageitemListElement with position, name, itemBreadcrumb trail in search results
Article / BlogPostingBlog posts and news articlesheadline, datePublished, dateModified, author, imageBetter understanding of article dates, authors, and images
Product with OfferIndividual product pagesname, image, offers.price, offers.priceCurrency, offers.availabilityProduct snippets with price and availability
FAQPagePages with visible question-and-answer contentmainEntity with Question and acceptedAnswerSince August 2023, FAQ rich results show only for well-known authoritative government and health sites

That last row is worth emphasizing. Google announced in August 2023 that FAQ rich results would be limited to authoritative government and health websites, and HowTo rich results were deprecated the same year. FAQPage markup is still valid Schema.org and can help machines understand your content, but most sites should not expect a visual payoff from it.

What Hand-Coded Schema Teaches You That Plugins Hide

Writing schema manually exposes problems that plugins quietly create. The points below are practitioner analysis from implementing and auditing structured data across many sites, not results from a controlled study.

The most common plugin problem is duplication. A theme outputs its own Organization and WebPage markup, an SEO plugin outputs another set, and an ecommerce plugin adds a third Product block with slightly different prices. Search engines then see conflicting statements about the same entity. When you hand-code, you see every block and can ensure each entity is described once and referenced elsewhere by @id.

The second issue is generic data. Plugins fill properties from whatever fields exist, so you see Article markup with the site name as the author, a logo as the article image, or a modified date that updates on every minor edit. Hand-coding forces you to decide where each value truly comes from, which produces more accurate markup and stronger author signals, something that aligns well with Google's emphasis on demonstrating experience and expertise.

The third lesson is that validity is not the same as correctness. The Rich Results Test confirms syntax and required properties, but it cannot tell whether your markup describes the page honestly. Errors like markup that does not match visible content belong in the same category as other structured data and other technical mistakes that only show up when a human reviews what the code actually claims.

Finally, hand-written JSON-LD tends to be smaller. Plugins often emit large graphs covering every possible type. A focused block with the properties Google actually uses keeps your HTML lean, which matters on templates where every kilobyte competes with content for the initial download.

Common Schema Markup Mistakes and How to Avoid Them

Most structured data problems are easy to prevent once you know what to look for.

  • Marking up invisible content. Reviews, ratings, or FAQs that users cannot see violate Google's structured data policies and can lead to a manual action. Only mark up what is visibly on the page.
  • Self-serving review markup. Google does not show review stars for LocalBusiness or Organization reviews that the business publishes about itself on its own site. Do not add aggregate ratings for your own company expecting stars.
  • Invalid JSON syntax. A trailing comma or unescaped quote breaks the entire block silently. Generate JSON with your language's serializer instead of string concatenation.
  • Relative URLs and inconsistent dates. Use absolute URLs and ISO 8601 dates with time zones so values are unambiguous.
  • Conflicting duplicate markup. Remove theme or plugin output before adding your own, and check the rendered page source to confirm only one block describes each entity.
  • Setting and forgetting. Prices, availability, and opening hours change. Pull values from the same data source the page displays so markup can never drift from content.
  • Chasing deprecated features. Adding HowTo markup or expecting FAQ stars on a commercial site wastes effort. Check Google's current documentation before implementing a type for its rich result.

Real-World Walkthrough: Schema for a Local Service Business Site

Here is a complete implementation plan for a typical small business site: a dental clinic with a homepage, service pages, a blog, and a contact page, built on a custom theme with no SEO plugin.

Global block. In the site-wide header template, add one JSON-LD block containing a Dentist entity (a LocalBusiness subtype) with an @id of the homepage URL plus #organization, the clinic name, logo URL, street address, phone number, opening hours, geo coordinates, and sameAs links to its official social profiles. Every value matches the footer and contact page exactly. Add a WebSite entity referencing the organization as publisher.

Breadcrumbs. The theme already displays visual breadcrumbs, so a template partial generates a matching BreadcrumbList from the same data, ensuring the markup and the visible trail never diverge.

Blog posts. The post template outputs BlogPosting with the headline from the post title, the featured image, real publish and modified dates from the CMS, an author Person entity linking to that dentist's bio page, and publisher referencing the organization @id.

Service pages. Each service page gets a Service entity with a name, description, and provider referencing the organization. No rich result depends on it, but it clarifies which services the clinic offers.

Validation and launch. Run this checklist before deploying:

  • Each template tested in the Rich Results Test with zero errors
  • Schema Markup Validator shows no unknown types or properties
  • Rendered source contains exactly one block per entity
  • Every marked-up value is visible on the page
  • Dates and URLs are absolute and correctly formatted
  • Search Console Enhancements reports monitored for two weeks after launch

Key Takeaways

  • JSON-LD is Google's recommended structured data format because it stays separate from visible HTML and is easy to template.
  • Every value in schema markup must match content users can see, or it risks violating Google's structured data guidelines.
  • Connecting entities with @id references prevents duplication and builds a coherent picture of your organization across pages.
  • FAQ rich results have been limited to authoritative government and health sites since August 2023, so most sites should not expect them.
  • Hand-coded schema is usually smaller, more accurate, and free of the conflicting duplicate markup that plugins and themes often create.

Frequently Asked Questions

Can I add schema markup without WordPress plugins?

Yes, you can add schema markup to any website without plugins by writing JSON-LD inside a script tag with the type application/ld+json. On WordPress, place it in your theme's header template or output it through a small function. On other platforms, add it to your page templates and fill values from your content data.

Where should I put JSON-LD schema code on a page?

Google can read JSON-LD placed in either the head or the body of your HTML. Most developers put site-wide types like Organization in the head and page-specific types near the related content or also in the head. What matters most is that the code is present in the rendered HTML Google processes.

Does schema markup improve Google rankings?

Google has said structured data is not a direct ranking factor. It helps search engines understand your content and can make eligible pages appear as rich results, such as breadcrumbs or product prices. Those richer listings can improve click-through rates, which makes schema valuable even without a direct ranking boost.

How do I test if my schema markup is working?

Use Google's Rich Results Test to confirm syntax and eligibility for specific rich results, and the Schema Markup Validator to check general Schema.org correctness. After deployment, monitor the Enhancements reports in Google Search Console, which show valid items, warnings, and errors for each detected structured data type over time.

What schema types should every website have?

Most websites benefit from Organization or LocalBusiness and WebSite markup sitewide, plus BreadcrumbList on inner pages. Then add one content-specific type per template, such as Article for blog posts, Product for product pages, or Event for events. Avoid adding types that do not describe the actual page content.

Is JSON-LD better than Microdata for schema markup?

For most websites, JSON-LD is the better choice and is the format Google recommends. It keeps structured data in one script block instead of scattering attributes throughout your HTML, making it easier to write, template, and maintain. Microdata still works, but it couples your markup to your design and breaks more easily during redesigns.

Conclusion

The key decision is to treat schema as data generated from the same source as your visible content, not as an SEO add-on bolted onto pages. Hand-written JSON-LD templates that pull real values, reference shared entities by @id, and pass validation give you cleaner, more trustworthy markup than any plugin default. Structured data works best when the pages it describes are organized logically, so your next step is to make sure your site follows an SEO-friendly site structure that your breadcrumbs and entities can mirror.

Chat on WhatsApp