How to Add Schema Markup to Your WordPress Site

By Eric Karkovack Updated on June 14, 2018

A website owner’s top priority should be ensuring that search engines are able to properly index their site’s content. In order to make that happen, the site must be set up to follow Search Engine Optimization (SEO) best practices. If your site was built with WordPress, then you’re already off to a nice start.

WordPress is a SEO-friendly platform by default. Right out of the box it provides features like “pretty” permalinks and content hierarchy that make it easier for search engines to digest. You can also extend SEO capabilities through the use of plugins or even themes. In short, WordPress enables you to create a customized SEO strategy to match your specific needs.

Today, we’ll take a look at one area of SEO that is becoming vitally important. The practice of adding Schema markup (sometimes called Structured Data or Microdata) to your website can provide a boost to your search engine rankings and CTR while also making your site more user-friendly.

Let’s explore what Schema markup is, the benefits of using it and how you can implement into your own WordPress website.

Introducing Schema: Where Content Meets Context

When search engines crawl through your website’s content, they’re attempting to put it all into a specific context. For years, we have relied on good old fashioned HTML tags to tell a story. Titles, headings, meta descriptions and keywords have all had a role in how a search engine listed and ranked our website.

For instance, if your home page has a title of “Web Designer New York City”, a search engine may well assume that’s what your site is about. But things aren’t always that obvious. As often happens, words and phrases can have multiple meanings and contexts. Without knowing that kind of information for certain, your site could be losing out when it comes to search relevancy.

That’s where Schema markup comes in. Created in part by search behemoths Google, Microsoft, Yahoo and Yandex, Schema adds a behind-the-scenes “vocabulary” to our content. Adding this markup to specific parts of a website will provide search engines with a higher level of context.

This context will help to ensure that, when your website is listed on a search engine results page (SERP), it will do so with more relevance in terms of subject matter. Put simply, Schema markup helps search engines figure out exactly what it is your site is all about.

Even better is that, when search engines have access to Schema markup on your website, they’ll be able to provide extra information in listings. That serves to both add convenience for users while bringing more traffic your way.

Now that we know Schema’s purpose, let’s take a look at how it works in practice.

Searching With Relevance

If you’ve searched for anything on the web recently, then you most likely have benefitted from the type of information that Schema markup provides. To show you what it can do, let’s use the classic movie “Return of the Jedi” as an example.

Schema in SERPs

Schema in SERPs

When searching for reviews of “Return of the Jedi”, Google magically shows us exactly what we’re looking for. While some aggregated critic reviews are indexed at the top, pay special attention to the highlighted listing from Roger Ebert’s site. Notice the star ratings just underneath the listing‘s URL.

Whether you’re looking for a movie or a review of the hot new restaurant in town, it’s quite useful to have that information appear right with the rest of the search results. Schema markup is what makes it possible.

By using the Review markup, Google was able to see what was being reviewed (“Return of the Jedi”), exactly what the rating was (4/4) and who authored the review (Roger Ebert). All of that came from some extra information added to Mr. Ebert’s website markup. Here’s a simplified version of that code:

<div itemscope itemtype="">
<aside itemprop="itemReviewed" itemscope itemtype="">
<h1 itemprop="name">Return of the Jedi</h1>
by <span itemprop="author">Roger Ebert</span>

While the example above uses basic HTML tags, notice the extra attributes that have been added in:

  • itemscope itemtype= Denotes what type of content this is (in this case, a review). Schema has attributes for many types of content. This enables a search engine to display a listing in a more relevant manner (like when someone is looking for reviews).
  • itemprop=”itemReviewed” itemscope itemtype= Besides movies, lots of different content can be reviewed. Books, music, television shows and games all come to mind. So it’s important to tell search engines exactly what type of review this is.
  • itemprop=”name”: The name of what is being reviewed.
  • itemprop=”author”: Provides the name of the author.

And we don’t want to forget about the rating (everybody wants to have those stars displayed in their listing):

<span itemprop="reviewRating" itemscope itemtype="">
<span class="star-rating"><i class="icon-star-full"></i><i class="icon-star-full"></i><i class="icon-star-full"></i><i class="icon-star-full"></i></span>
<meta itemprop="ratingValue" content="4.0"></meta><meta itemprop="worstRating" content="0.0"></meta><meta itemprop="bestRating" content="4.0"></meta>

Breaking down the code above, we can see how a rating comes together:

  • itemprop=”reviewRating” itemscope itemtype= Tells search engines that we’re going to display a review rating.
  • itemprop=”ratingValue” content=”4.0″: Shows the exact rating for “Return of the Jedi”.
  • itemprop=”worstRating” content=”0.0″: The lowest possible rating.
  • itemprop=”bestRating” content=”4.0″: The highest possible rating.

How much do stars actually help in SERPs? The CXL Institute ran a study and both companies that utilized stars for reviews saw a significantly higher click-through rate for organic SERPs, by as much 35%. Their conclusion was that this strategy does yield higher results.

The purpose of it all is to provide search engines with certainty regarding what your content is all about. The end result is that your favorite search site can bring up useful and relevant information for whatever it is you’re searching for. It’s how Google knows what time your favorite store closes or how Bing is able offer up a menu for that pizza place down the street.

By adding Schema’s vocabulary to our site, we’re helping to empower the spread of accurate information about our content and organization. That can be of benefit to everyone.

Next, we’ll explore some ways you can add structured data to your own WordPress website.

Using Schema With WordPress

Much like everything else involving WordPress, adding Schema markup to your site is a highly-customizable process. What you may not realize is that both your theme and the various plugins you’re already using could be adding some of this information for you. In particular, SEO and breadcrumb navigation plugins may include some structured data into your content.

So before you start adding markup, it’s a good idea to find out what (if any) is already present in your content. That will let you know where you currently stand so that you can further develop a strategy.

Assess Your Situation With Google’s Structured Data Testing Tool

Google makes it easy to determine your site’s markup with their Structured Data Testing Tool. Enter your site’s URL or paste in a code snippet to let the tool analyze your content.

Google Structured Data Testing Tool

Google Structured Data Testing Tool

For our purposes, we’ll analyze Roger Ebert’s review of “Return of the Jedi.”

Schema errors

Schema errors

As it turns out, there were a few errors found (5 to be exact). Apparently the tool didn’t find some required fields in the expected places. That being said, the test gives us an inside look at the structured data included with the content. From here, we can see what looks good and what needs to improve.

Add Schema Markup via a Plugin

Once you’ve done some initial testing to see what type of structured data your site is already producing, it’s time to further enhance things. The simplest way to do that is by adding the free Schema plugin. In fact, Kinsta uses this very plugin on all their blog posts and knowledge base posts. This plugin supports custom post types.

Schema WordPress plugin

Schema WordPress plugin

It sports some handy features such as enabling different schema types on a per-category or per-post type basis. It will also work with other installed plugins, such as Yoast, to take advantage of the markup you’re already using.

This plugin uses JSON-LD (a lightweight Linked Data format), which is what is recommended by Google, and also supported by Bing. It currently has over 20,000 active installs with a 4.5 out of 5-star rating. The developer is also very active about updating it when changes happen in SERPs. Note that review markup is not included with the core Schema plugin. However, there is a free Schema Review companion plugin that will add this capability.

Now, on to installing and setting up Schema. To install the plugin from within WordPress, navigate over to Plugins > Add New and search for “Schema”.

Install Schema WordPress plugin

Install Schema WordPress plugin

Once the plugin is installed and activated, head to Schema > Settings to start enhancing your site with markup. Fill in the basics like the location of your About and Contact pages, along with adding a logo. Then, navigate through the Content, Knowledge Graph and Search Results tabs to ensure optimal setup. This step alone will begin adding some basic markup to your site.

Schema plugin settings

Schema plugin settings

Next, you’ll want to check out Schema > Types. This is where you can add custom markup to each post type – or just specific categories if you wish. By default, you’ll see entries for Posts and Pages – but you can add others. Check out the plugin documentation for some more advanced usage capabilities.

Tired of WordPress hosting support that seems to know less than you do?

We understand! That’s why Kinsta only employs high-skilled developers and Linux Engineers. The expertise of our support department is second to none, and we’re available 24x7 to help!
Schema types

Schema types

Alternative Schema Markup Plugins

Just like with anything WordPress, there are always alternative plugins or ways to do things. Check out these other schema markup plugins you could use.

Additional Notes on Schema

The first rule when using schema markup is to be honest. Don’t be misleading, untruthful, or try to falsify reviews or ratings. Basically, don’t try to be slicker than Google. Google is very clear about what they expect. Fill in every box, and be clear and concise. Create a page for each product, item, person, recipe, etc. Don’t try to put multiple items on a single page.

Also, just because you add schema markup doesn’t mean that you are guaranteed it will show up. For example, it could takes months for stars for reviews to show up in Google. Or they might not show up at all. But it’s always recommended to add schema markup because it can definitely give you the best chance for success in SERPs, and help increase your CTR.

With Google moves to their mobile-first index, you should ensure that schema markup and structured data is working on both the mobile and desktop version of your site.

A Running Start With Room to Grow

Adding the Schema plugin to my own site required minimal setup to start publishing some basic info. Within 10 minutes, my blog posts were optimized with markup for information like author, title, image and publish date. Plus, other pages within my site were also optimized. It’s a great start and I can further tweak things to meet the needs of my own specific content.

Schema markup can benefit just about any type of website. And with so many consumers out there searching while on-the-go, it’s especially important for businesses that have a physical presence. Displaying relevant information directly on a search engine’s listing page can be the difference between making a sale or not.

Take a little time and think of some ways you might use Schema markup to further enhance your search engine listings. A small effort could make a significant difference.

If you enjoyed this article, then you'll love Kinsta's WordPress hosting platform. Whether it's speeding up your website or getting 24x7 support from our veteran WordPress team, we're here to help your business succeed. Our Google Cloud powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the Kinsta difference! Check out our features

Hand-picked related articles

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.
  1. Gravatar for this comment's author
    Visualmodo WordPress Themes December 6, 2017 at 4:44 am

    Very interesting post, thank you for share!

  2. Gravatar for this comment's author
    omry biton April 23, 2018 at 9:56 pm

    It does not seem to work for you :/

    1. Gravatar for this comment's author
      Brian Jackson May 20, 2018 at 11:23 pm

      Hey Omry,
      We don’t add ratings to our posts, that would be manipulating SERPs. Our “BlogPosting” schema is working just fine, you can check it here:

  3. Gravatar for this comment's author
    Rahul April 24, 2018 at 2:54 am

    I’ve tried a few plugins mentioned but every time I get some error when I created the custom code using a generator and pasted the code in my header.php file.

    1. Gravatar for this comment's author
      Brian Jackson May 23, 2018 at 9:35 am

      Hey Rahul!
      If you are having trouble adding Schema with code you might want to try one of the third-party plugins mentioned.

  4. Gravatar for this comment's author
    Vrisha Malan May 4, 2018 at 5:17 am

    Actually, I am working on my website very hard to get sharp results, but so far no improvement, but I have learned a lot from this page, and hope it will help us to grow.

    I am working for my client to improve in SERP results and Schema Markup is definitely gonna help me. I would like to ask one thing that these schema markups will help with Open Graph results as well. I Have Just Setup “All In One Schema Rich Snippets” Plugin on my website. But I have a doubt on how to make sure Google is picking up the correct aggregated reviews as in schema markup the reviews are hard coded.

    My quick questions are; how to make sure that the reviews are true for local business? How much time does it take to show up rich snippets for my search results? Anyways, thanks for sharing schema Markup will definitely help my business.

    1. Gravatar for this comment's author
      Brian Jackson May 23, 2018 at 10:02 am

      Hey Vrisha!
      I recommend using the Google Structured Data Testing tool. You can see if Google is picking up your new code or not. As for it showing in SERPs, this can vary quite a bit. I’ve seen it take a few days to change and weeks for others.

  5. Gravatar for this comment's author
    Andy May 23, 2018 at 9:29 am

    I’m finding my client’s theme choices causing most of the schema issues – the ubiquitous hentry and missing author/update/etc. The theme you use could cause issues as it did with several of mine. Excellent article!

    I was wondering if adding the Schema Plugin to a current Yoast SEO plugin that already adds some schema. Would these 2 plugins conflict or is Yoast SEO enough to cover schema?

    1. Gravatar for this comment's author
      Brian Jackson May 23, 2018 at 9:33 am

      Hey Andy! Yes, a lot of times themes are to blame. The Schema plugin and Yoast SEO work great together and even have options for which one should override the other.

      Yoast SEO won’t always cover schema data for custom post types and other configurations. This is where you will need to do a bit of extra work, either with your theme or another third-party plugin.

  6. Gravatar for this comment's author
    Raju June 12, 2018 at 2:27 pm

    Hey Brian,
    Excellent article.
    I used the “localbusiness” schema and got two obvious errors in the Google Structured Data Testing tool:
    1. image : A value for the image field is required.
    2. priceRange : The priceRange field is recommended. Please provide a value if available.

    I traced that it is coming from the “WP Customer Reviews” plugin where the following two lines of meta-tags are missing:

    I tried by including those line in theme’s “header.php”; but that is not solving the issues. The errors are still there.
    Do you know, how can I resolve this?

    1. Gravatar for this comment's author
      Brian Jackson June 18, 2018 at 2:21 pm

      Hey Raju!
      If you’re getting schema errors with a particular plugin we recommend reaching out to the developer and asking for assistance. Most likely they can push out an update to fix it.

  7. Gravatar for this comment's author
    Junaid August 20, 2018 at 4:13 am

    How did you get rid of ‘Description’ from your aboutPage and contactPage?

    You guys are also using the schema plugin. This plugin by default adds the description in AboutPage and ContactPage but you guys don’t have it?

  8. Gravatar for this comment's author
    Drew September 12, 2018 at 7:04 pm

    People are soooo lazy when they resort to posting about plugins. Do so research and tell us how to avoid stinking plugins.

    1. Gravatar for this comment's author
      Brian Jackson September 12, 2018 at 8:23 pm

      Hey Drew! We’d love to share just straight code with you, but a lot of times this just isn’t practical.

      1. You have to maintain the code yourself and keep it updated as standards change. People are busy, why not rely on the amazing developers who know the standards (in this case Schema Markup) better than most?
      2. A well-coded plugin isn’t going to introduce much more overhead than the code itself.
      3. You have to remember a majority of the WordPress community isn’t as tech savvy as the developer crowd. They need easy solutions to solve problems.

      There are of course not so great plugins out there which you want to stay away from. Trust me, we’ve seen the worst of the worst. That’s why we share things we actually use on a daily basis. We use the above Schema plugin on our own site and it works great. It’s lightweight and the developer keeps it up to date.

Leave a Reply

Use WordPress?

Use WordPress?

Join 20,000+ others who get our FREE weekly newsletter with WordPress tips on how to drive more traffic and revenue to your business!


You have Successfully Subscribed!

Send this to a friend