Skip to content
Black Friday 50% off + 15,000 credits Ends Nov 30 Ends Nov 30 see the deal
Black Friday15,000 free credits + 50% offends Nov 30

How to Add Schema Markup in WordPress (With or Without a Plugin)

Schema markup tells search engines what a page is about in a structured way: this page is a product with this price, this business opens at these hours. In WordPress you can add it with your SEO plugin, a schema plugin or a few lines of JSON-LD. Here is which to use, how to test it, and what changed in Google this year.

In this article
  1. 01The short answer
  2. 02What schema markup does, and doesn't
  3. 03Which schema types matter for WordPress sites
  4. 04Method 1: let your SEO plugin do it
  5. 05Method 2: a schema plugin
  6. 06Method 3: add JSON-LD yourself
  7. 07Test it
  8. 08Mistakes to avoid
  9. 09Where WPOS fits
Key takeaways
  • Your SEO plugin probably adds schema already: Yoast SEO, Rank Math and All in One SEO all do.
  • Use JSON-LD; Google treats it, Microdata and RDFa equally when valid, and JSON-LD is the easiest to maintain.
  • Google no longer shows FAQ rich results (announced May 2026), and How-to rich results are deprecated.
  • Mark up only what visitors can see: hidden or misleading markup can lead to a manual action.
  • Test with Google's Rich Results Test and the Schema Markup Validator, then watch Search Console.

The short answer

  1. Check what your SEO plugin already outputs. Yoast SEO, Rank Math and All in One SEO all add schema.org structured data.
  2. Fill in the details it asks for: your organization or person, logo and social profiles, so the markup is accurate.
  3. Add the types it doesn’t cover with a schema plugin or your own JSON-LD.
  4. Test every template in Google’s Rich Results Test, then watch Search Console.

What schema markup does, and doesn't

  • It helps search engines understand the page, and can make it eligible for rich results such as product prices, ratings or event dates. Google’s guidelines are clear that it doesn’t guarantee them.
  • JSON-LD is the format to use. Google accepts JSON-LD, Microdata and RDFa equally when valid, and recommends the one easiest to implement and maintain, which in most cases is JSON-LD.
  • FAQ and How-to rich results are gone. Google no longer shows the FAQ rich result, a change announced in May 2026 (see its documentation updates), and the How-to rich result is deprecated. Add FAQ markup to describe a page if you like, but not for dropdowns in Google.
  • Mark up only what’s on the page. Markup about content hidden from visitors, or misleading markup, can lead to a manual action.

Which schema types matter for WordPress sites

Google lists the types it supports in its search gallery. The ones most WordPress sites need:

SiteSchema typesNotes
Blog or newsArticle, BreadcrumbListUsually added by your SEO plugin
Business or agencyOrganization or LocalBusinessName, logo, address, phone and hours, as shown on the site
StoreProduct, Review snippetWooCommerce adds Product data to product pages itself
EventsEventDates, place and tickets
Courses and softwareCourse, SoftwareApplicationOnly when the page is that course or app
VideoVideoObjectFor pages built around a video

Method 1: let your SEO plugin do it

The three most installed SEO plugins all add structured data (WordPress.org installs on 20 November 2026):

PluginActive installsSchema
Yoast SEO10,000,000+schema.org structured data built in; Premium outputs more types
Rank Math4,000,000+16+ schema types, and automatic schema for WooCommerce
All in One SEO2,000,000+Schema markup, including generated with AI

Run only one SEO plugin: two print two sets of markup that can contradict each other. Then set the site-wide details in its settings (organization or person, logo, social profiles) and pick the right type for special pages.

Method 2: a schema plugin

When your SEO plugin doesn’t cover a type, a dedicated plugin can. Schema and Structured Data for WP (100,000+ installs) offers more than 35 types, from Local Business and Recipe to Product and Video Object, with templates you assign to pages. Check it doesn’t duplicate what your SEO plugin already prints.

Method 3: add JSON-LD yourself

For one or two pages, a short snippet is the cleanest option. This prints LocalBusiness markup on the homepage only; change the details to match what your site shows:

add_action( 'wp_head', function () {
	if ( ! is_front_page() ) {
		return;
	}
	$data = array(
		'@context'  => 'https://schema.org',
		'@type'     => 'LocalBusiness',
		'name'      => 'Example Bakery',
		'url'       => home_url( '/' ),
		'telephone' => '+1-555-0100',
		'address'   => array(
			'@type'           => 'PostalAddress',
			'streetAddress'   => '1 Main Street',
			'addressLocality' => 'Fort Worth',
			'addressRegion'   => 'TX',
			'postalCode'      => '76102',
			'addressCountry'  => 'US',
		),
	);
	echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>' . "\n";
} );

Add it with a code snippets plugin or in a child theme. wp_json_encode takes care of escaping. If your SEO plugin already outputs an Organization for the site, extend that instead of adding a second one.

Test it

  • Rich Results Test (Google): paste a URL or code and see which rich results the page is eligible for, with errors and warnings.
  • Schema Markup Validator: checks any schema.org markup, including types Google doesn’t show as rich results.
  • Search Console: after Google recrawls, its reports show errors across every page of the same type.
  • Check after changes: a new theme, SEO plugin or page builder can remove or duplicate markup. Clear the cache before testing a live page; see clearing the cache.

Mistakes to avoid

  • Two plugins printing the same types, for example two Organizations or two Products with different prices.
  • Markup for things visitors can’t see, such as reviews or FAQs that aren’t on the page.
  • Stale details: old prices, hours or addresses in markup after the page changed.
  • Expecting a rich result for a type Google no longer shows.

For the other on-page basics, see our guides to meta tags in WordPress and the site audit checklist.

Where WPOS fits

WPOS includes its own SEO engine: metadata, schema, redirects, IndexNow and llms.txt, managed from chat. The agent can set a page’s structured data, keep it to what the page shows, and check the live page after the change. One request:

“Add LocalBusiness structured data to the homepage with our address, phone and opening hours from the contact page, make sure nothing else prints a second business, and show me the JSON-LD on the live page.”

WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.

Frequently Asked Questions

The easiest way is the SEO plugin you probably already use: Yoast SEO, Rank Math and All in One SEO all add schema.org structured data. For types they don't cover, use a schema plugin or add JSON-LD with a few lines of code, then test the page in Google's Rich Results Test.

No. You can print JSON-LD in the page head with a small code snippet. A plugin is easier to keep accurate across many pages, and most sites already have one through their SEO plugin.

JSON-LD. Google accepts JSON-LD, Microdata and RDFa equally when the markup is valid, and recommends the one easiest to maintain, which in most cases is JSON-LD.

Not directly. It helps search engines understand a page and can make it eligible for rich results, such as product prices or event dates, but Google doesn't guarantee rich results even when the markup is valid.

Not for Google's rich results: Google no longer shows FAQ rich results, a change it announced in May 2026, and How-to rich results are deprecated too. The markup can still describe the page, but don't expect FAQ dropdowns in Google.

Use Google's Rich Results Test to see which rich results a page is eligible for, and the Schema Markup Validator to check any schema.org markup. Search Console then reports errors across the site.

Misleading or hidden markup can lead to a manual action that removes a page's eligibility for rich results. Mark up only what visitors can see on the page, and keep it accurate.

Black Fridayends Nov 30

Start free with 15,000 credits.

Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.

Claim 15,000 credits