Why You Need WordPress Schema Markup and How to Add it to Your Site

When it comes to WordPress SEO, there are a lot of things you need to get right. Firstly, there is offsite and onsite SEO to think about. But, there’s also another factor that influences your search engine appearance, and the ability of search engine bots to crawl your site, which is called schema markup.

Although it’s been newly introduced, implementing schema markup can be very beneficial to any WordPress website. For example, with schema markup, you’ll be able to boost your traffic levels, CTR, and the ability to crawl your site.

Below we explore what schema markup actually is, why you want it, and how to add schema to WordPress site.

A schema is a behind-the-scenes code that gives Google (and other search engines) more information about your site. The most common form of schema markup is known as rich snippets. You’ve probably come across these in the search results.

If you haven’t, they look like this:

Examples of a Schema markup from the SERP of "homemade chicken soup recipe"

Not only do they look cool, but having rich snippets listed in the search results can actually increase traffic to your website via search engines. Even if your position in the search results hasn’t changed. Once Google crawls your site that contains a schema markup, it’ll be able to use that data to create more attractive and useful search results.

When you implement schema markup, you’re giving the Google bots more accurate and useful information about your site. How the rich snippet looks will depend upon the type of content on your page. For a review, it’ll contain things like star ratings. While if it’s a product page, you’ll see things like the price and the product availability listed.

There are many different types of schema markup you can use based on the type of content on the page itself.

What Are the Benefits of Schema Markup

Traditionally, we’ve used formatting tags to let Google know what our WordPress site is about. These include things like our heading tags, choosing a focus keyword, and optimizing our meta descriptions.

But, even with these, the context of our pages can be obscure, especially with words or phrases that have multiple meanings.

We add schema to our sites to give additional context to our pages and posts. This will help them rank more accurately in the search engines. Plus, it’ll improve our search engine appearance, which influences our CTR and other crucial statistics.

With schema in place, you’ll rank for more relevant search results, which means higher quality traffic for your website.

Different Types of Schema Available

There are dozens of different schemas that you can put in place, and Google currently supports over 50 different schemas.

Spend some time browsing the list and see what kinds of relevant schema you can add to your site. Some of the most common forms of the schema include:

  • Local business data
  • Events
  • Recipes
  • Movie listings
  • Reviews
  • Reservations
  • Articles

What Does Schema Look Like

Now that you know what schema in WordPress is, we’ll look at a few examples. First, we’ll search for the movie “The Revenant”:

Example of a Schema mark up for "the revenant" keyword

The very first result from IMDB has schema markup implemented. Notice the starred and review section. Schema makes the display of the star rating possible, so you can quickly decide if the movie is worth watching or not.

The same type of star rating appears for any type of review, whether that’s a restaurant, movie, book, or even a recipe. Look at the results when we search for “apple pie recipe”:

Examples of a Schema markup for the keyword "apple pie recipe"

The starred review section is highlighted again. There’s also more information about the recipe, including an image and the time it takes to prepare the recipe.

For a final example, let’s search for “Obama”:

Examples of a Schema markup for the keyword "Obama"

Instead of the starred review like the examples above, you’ll see the news style schema.

Thus, with a schema, you give Google a better idea of the information that’s worth highlighting, and it’ll display that information in the search results.

How to Test for Existing Schema Markup

You can use Google’s Structured Data Testing Tool to see if you have any existing schema installed on your site. Sometimes your WordPress theme will have built-in schema markup.

You can paste in your site’s code or just use the URL to your website.

How to use Google's Structured Data Testing tool to see if there is schema installed on the page

After you run your site through the tool, you can see which schema is active and if any schema errors are present.

How to Add Schema to WordPress

By now, you see the value of adding schema to WordPress site. Below you’ll learn two different approaches you can take to add schema to your site:

1. How to Add Schema to WordPress With the Schema Plugin

The easiest way to add schema to your site is to use the Schema plugin. This plugin will work with any existing schema and will also integrate with the plugin Yoast SEO.

To install this plugin navigate to Plugins ->Add New from within your WordPress dashboard and search for “Schema”.

Schema WordPress plugin

Install and activate the plugin, then head over to Schema -> Settings to start configuring the plugin.

The General settings of the Schema WordPress plugin

Enter your basic information like the location of your About Page, Contact Page, and upload your website logo.

By filling out the additional sections, content, knowledge graph, and search results, you can optimize your site for each of those areas.

Next, you can navigate to Schema -> Types and add a specific schema to a type or category of post.

How to add a specific Schema to a type or category of a post or page

If the plugin above doesn’t suit you, then you can use one of many other options.

Schema Pro is another schema plugin for WordPress worth checking out. It’s very easy to use and has a simple 3-step process to add all supported schemas to your website.

Here are some alternative WordPress schema plugins:

2. How to Add Schema to Your Site Manually

You can also add schema to your site manually. It’ll be more code intensive, but you can add custom schema on an individual post and page basis.

With custom schema, you can also include multiple different schemas per page. So, if you have an event page but also want to include a review schema, then you can easily do that.

The most effective way to manually add schema to your site is to use JSON-LD. This method is also recommended by Google.

The JSON-LD method is JavaScript based. You’ll be adding schema to WordPress site as a script, so it’ll be much easier to read and debug.

If you don’t know how to write markup yourself, then you can use Google’s Structured Data Helper to create your code for you.

To use this approach navigate to any post or page where you’d like to add schema markup. Click on Screen Options at the top of the page, and check both that say ‘Custom Fields’.

Checking the Custom Fields box in Screen Options

Now, scroll down to where it says ‘Custom Field’ and click ‘Enter new’ to create a new custom field. Name it ‘schema’ and enter the following code (this is a local business data example):

<script type="application/ld+json">
{
 "@context": "http://schema.org",
 "@type": "Organization",
 "address": {
   "@type": "PostalAddress",
   "addressRegion": "Neverland",
   "streetAddress": "667 Acme Road"
 },
 "description": "The Acme Organization has been run by the Acme family for generations.",
 "name": "Acme Organization",
 "telephone": "(0)12 34 56 789"
}
</script>

Now click ‘add custom field’ and update your page.

Next, you’ll need to edit your header.php file. Open it up and insert the following code before the closing </head> tag:

<?php
$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true);
if(!empty($schemamarkup)) {
  echo $schemamarkup;
}
?>

This will make it so that your schema code is loaded along with your post metadata. With the above approach, you can add any kind of custom schema markup to your WordPress site.

Just remember to run your page or post through the Google Structured Data Testing Tool to check your markup for any errors.

Conclusion

Adding a schema to your site doesn’t take a lot of time, and it can improve your search engine appearance and website traffic.

The process might seem a little technical and daunting, but even the manual approach isn’t that difficult once you dig into it. Plus, the number of plugins available makes even basic implementation of schema in WordPress very simple.

No matter what kind of site you run, there’s a schema markup that can be added.

Have you seen any results from implementing schema on your site? Please share your experience in the comments below. 

Author
The author

Kevin Wood

Kevin is a freelance writer who specializes in technology and online content marketing. He loves making complex marketing and technology topics accessible to all readers. When he’s not glued to his screen, you can find him lost in a book, writing poetry, or running through the woods.