Table of contents
Plugins are convenient, but they add weight and sometimes output schema you don't want. You can add schema markup without a plugin in a few minutes using JSON-LD: Google's recommended format. Here's how on the three most common setups.
Step 0: Generate the JSON-LD
Pick the right type for the page (Article for posts, Product for product pages, LocalBusiness for your contact page) and generate the code. Our free schema markup generator outputs a ready block wrapped in a script tag:
<script type="application/ld+json">
{ "@context": "https://schema.org", "@type": "Organization", "name": "Your Brand", "url": "https://example.in/" }
</script>
Method 1: WordPress (no plugin)
For one page or post: open the block editor, add a Custom HTML block at the end of the content and paste the script. JSON-LD works in the body, not only the head.
For the whole site (for example Organization schema), add this to your child theme's functions.php:
add_action('wp_head', function () {
if (is_front_page()) {
echo '<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"Your Brand","url":"https://example.in/"}</script>';
}
});
Always use a child theme, or your code disappears when the theme updates.
Method 2: Blogger
- Go to Theme → Edit HTML.
- Find
</head>and paste site-wide schema just above it. - For a single post, switch the post editor to HTML view and paste the script at the bottom.
Blogger's XML template is strict: if it complains, make sure every quote and bracket is closed.
Method 3: Plain HTML or PHP sites
Paste the script inside <head> of the page file. On PHP sites, put shared schema (Organization, WebSite) in the header include and page-specific schema in each template.
No coding needed: Choose from 227+ schema types, fill the form and copy valid JSON-LD with the script tag included. Try the free tool
Test before and after publishing
- Paste the code or URL into Google's Rich Results Test (for supported types) or the Schema.org validator (for all types).
- Fix errors first, warnings second.
- After publishing, use Search Console URL inspection to confirm Google sees it.
Mistakes that break schema
- Smart quotes (“ ”) pasted from Word or WhatsApp instead of straight quotes
- A trailing comma after the last property
- Two plugins and your manual code all outputting the same type
- Marking up content that isn't visible on the page
- Fake ratings: never add review stars you didn't collect
Which schema to add first
- Homepage: Organization + WebSite
- Blog posts: Article or BlogPosting
- Contact/location page: LocalBusiness
- Shop pages: Product
- All pages: BreadcrumbList
FAQs
Is JSON-LD better than Microdata?
Google supports both, but recommends JSON-LD because it's separate from your HTML and easier to maintain.
Can I put JSON-LD in the body?
Yes. Google reads JSON-LD in either the head or the body.
Will schema improve rankings?
Not directly. It helps search engines understand the page and can make it eligible for rich results.
