Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Add Schema Markup in WordPress and WooCommerce

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to easily add schema markup in WordPress?

Schema markup helps you provide important information to search engines that they can use to enhance your listing in the search results.

In this article, we will show you how to easily add schema markup in WordPress and bring in more free SEO traffic from search engines to your website.

Adding schema markup to a WordPress website

Here is a quick overview of the topics we will cover in this article:

What Is Schema Markup?

Schema markup is a special type of HTML code that you can add to your WordPress website to tell search engines more about your content.

For instance, you can tell the search engines that a particular page is a blog post, a recipe, FAQ, a news article, or a product page in your online store. Search engines can then use this data to display rich results.

Rich results in Google Search

Search engines like Google also use schema markup to display information in other searches.

For instance, in Google Maps, your listing would appear with directions, open hours, business phone numbers, and more.

Local search results preview

These enhanced search listings are called rich results or rich snippets. They make your site stand out in SERPs, which improves your organic click-through rate and brings you more free traffic.

That being said, let’s take a look at how to easily add schema markup in WordPress without writing any code.

How to Add Schema Markup in WordPress

The easiest way to add schema markup in WordPress is by using All in One SEO for WordPress. It is the best WordPress SEO plugin on the market and allows you to easily add schema markup to your WordPress site.

All in One SEO for WordPress

The first thing you need to do is install and activate All in One SEO for WordPress. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, the plugin will launch a setup wizard that will walk you through the setup. If you need help, then follow our article on how to set up All in One SEO for WordPress.

Now, if you completed the setup, then the plugin will automatically set up the correct schema markup and apply it across your website.

However, we will walk you through all the schema markup settings manually so that you can change the settings if needed.

Setting Site Wide Schema Markup in WordPress

First, we will start by telling search engines some basic information about your WordPress website. Go to the All in One SEO » Search Appearance page and scroll down to the Knowledge Graph section.

Provide your website information for Knowledge Graph

From here, you need to choose whether your website is about a person or an organization. For an organization, you can provide a name, business phone number, contact type, and a business logo.

If your website is about a person (such as a personal blog, resume website, or portfolio website), then you can select the person’s user account from the drop-down list or enter their information manually.

Person meta data

If you choose an existing WordPress user, then you can edit the selected user’s profile by visiting the Users » Profile page.

Here you can provide the user’s Twitter and Facebook profile URLs.

Edit user profile

Also, make sure that you have entered the user’s first and last name correctly and have chosen the correct name to be displayed publicly.

Lastly, you will need to set up the user’s profile photo as a Gravatar.

Don’t forget to click on the ‘Update Profile’ button to save your changes.

Setting Up Default Schema Markup in WordPress

The next step is to choose the default settings to use for generating schema markup for all your WordPress posts and pages.

This will ensure there is schema markup correctly set up for all your WordPress posts, pages, products, or any other content types.

Simply go to the All in One SEO » Search Appearance page and switch to the ‘Content Types’ tab. From here, you will see all your post types listed.

Search Appearance content types

For each post type, you’ll notice a ‘Schema Markup’ tab.

Switching to it will allow you to choose the default schema type for that particular post type.

Choosing default Schema markup for content types in WordPress

From here, you can review the settings and change them if needed. For instance, if you run a news website that uses WordPress posts as news articles, then you may want to change the article type to News Article schema.

Changing Schema Markup for Individual Posts and Pages in WordPress

Since you’ve already set up default schema settings, you won’t need to manually change your schema markup for most of your content.

However, there are a few cases where you may want to adjust the schema settings for an individual post or page.

For example, if you are using custom WordPress landing pages as product pages, then you will want search engines to know that. Similarly, some blogs may be using WordPress posts to publish recipes, news articles, or reviews.

In these scenarios, you may need to change the schema markup for that particular post or page.

Simply edit the post or page that you want to modify. On the post editor screen, scroll down to the ‘AIOSEO Settings’ box below the editor and switch to the ‘Schema’ tab. Then, click the ‘Generate Schema’ button.

Change a single post or page's schema markup

From here, the Schema Catalog will open, and you can see the different types of schema you can choose from.

Each schema type comes with its own microdata.

AIOSEO Schema Catalog

For instance, you can change a post to Recipe.

Then, you can provide a recipe description, cuisine type, preparation time, instructions, and more.

Additional fields to enter recipe schema information

Similarly, you might pick the Product schema type.

Then, you can provide price, brand, currency, availability, color, size, material, and more.

Changing any page schema to a product in WordPress

This is such a handy tool for websites that are selling products using a simple online payment form instead of an eCommerce platform.

Setting Up Schema Markup for WooCommerce

All in One SEO is the most comprehensive WooCommerce SEO plugin on the market. Apart from the usual SEO settings, it also correctly selects product schema markup for all your products.

It will fetch all the necessary metadata from your WooCommerce product listing,s like pricing, currency, availability, reviews, star ratings, and more.

To enable schema markup in WooCommerce, simply click ‘Yes’ next to the ‘Autogenerate Fields’ option.

Enable Autogenerate Fields for Product Schema

Additionally, you can provide the brand, identifier type, identifier number, and other details under the ‘Schema’ tab for each product.

This comes in handy if your store is selling products from other brands with a standardized identifier like GTIN, MPN, or ISBN.

Product schema metadata

Adding Schema Markup for Local SEO

Over 40% of all searches on Google have local intent. That means those users are looking for local businesses and services nearby.

Most local searches lead to a purchasing decision, which makes them highly lucrative for small businesses.

Local SEO helps you put your business on the map for users to easily find. This allows your store or business to appear in local Google search results.

Local search results

It also makes your business appear in other Google products like Google Maps.

This brings more walk-in customers to your physical location.

Local search results preview

All in One SEO comes with a Local SEO addon that allows you to easily optimize your website for local search results.

Simply go to the All in One SEO » Local SEO page and click the ‘Activate Local SEO’ button.

Enable Local SEO

Upon activation, if your business has multiple locations, then you’ll want to turn that option on.

You’ll then be able to add individual locations and set them up.

Multiple or single location business

Below that, you can provide your information.

This includes your business name, logo, phone number, business type, payment options, and more.

Business information

After that, you can switch to the ‘Opening Hours’ tab.

This is where you can enter your business hours.

Opening hours

Simply enter the working hours for each day.

You should also mark the days when your business is closed.

Working hours

Don’t forget to click on the ‘Save Changes’ button to store your settings.

For more details, take a look at our guide on how to add business hours in WordPress.

Once you have set up local SEO on your WordPress website, you can also sign up for a Google My Business account to claim your business.

Testing Your Schema Markup for Rich Snippets

You can test the schema markup on your WordPress website using Google’s Structured Data Testing tool. Simply enter the URL of your website, and it will fetch the structured data markup found at that URL.

Structured data testing tool

If there is an error or warning, then you can troubleshoot it by revisiting the schema markup settings on your website.

Google also provides a newer Rich Snippets testing tool. It not only checks schema markup on your website for rich snippets but will also show you if some data is missing.

Rich snippets testing tool

In addition, All in One SEO offers a built-in Schema Validator.

It makes sure your schema code is free of syntax errors and that it’s implemented correctly.

All in One SEO Schema Validator

Simply go to the ‘Schema Validation’ tab and click the ‘Test with Google’ button.

You’ll automatically be redirected to Google’s Rich Snippets testing tool that we mentioned above.

Expert Guides on Schema Markup in WordPress

Now that you know how to add schema markup to your WordPress website, you might like to see some more specific articles related to schema markup.

We hope this article helped you learn how to easily add schema markup to your WordPress website. You may also want to see our guide on how to track website visitors to your WordPress site and our comparison of the best email marketing services for small businesses.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

7 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dennis Muthomi says

    Excellent resource as always!.

    One tip I’d like to add is to regularly test your schema markup after making any website updates or changes. people often update the blogs content but forget to also work on the schema data

  3. Peter Iriogbe says

    Great tip! I appreciate the simplicity – just hitting the ‘Validation’ tab and clicking ‘Test with Google’ takes you straight to the Rich Snippets testing tool. It streamlines the process of checking how your content appears in search results. Time-saving and user-friendly approach for optimizing snippets. Thanks for sharing this valuable insight!

  4. Jiří Vaněk says

    Hello, I have a question for you. I use AIO SEO PRO license and employ markup schemas. When I have a blog post with FAQs at the end, can I use two schemas? One for the blog post and one for the FAQs? The article combines both, the blog post itself and the FAQs at the end. AI suggested that it’s possible to use both markup schemas. I’m not sure about that.

    • WPBeginner Support says

      You can certainly use both on a post as the FAQ schema would share what is in the FAQ while the post schema would show the content in your post :)

      Admin

  5. Megan Brain says

    Thanks so much for this helpful article. Schema markup is something we should all be learning how to implement. I appreciate the great tips.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.