WordPress Tutorial

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

WordPress schema markup

When it comes to 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 your WordPress site.

How Are Schema Markups and Rich Snippets Related?

A schema is 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:

schema markup example

Not only do they look cool, but having rich snippets listed in the search results can actually increase your search engine traffic. 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 upon 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 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 schema include:

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

What Does Schema Look Like?

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

the revenant movie schema markup example

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”:

apple pie schema markup example

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”:

obama schema

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.

schema markup test

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 your 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 plugin

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

schema plugin settings

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 specific schema to a type or category of post.

schema plugin types

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

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 your 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, or the JSON-LD Generator 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 the both that says ‘Custom Fields’.

custom fields wordpress

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 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.

Final Word

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 make even basic implementation of schema 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. 

About 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.

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Have a website?

Join thousands of webmasters who get our free newsletter with tips on how to drive more traffic and revenue to their websites!

Please wait...

Thank you for sign up!

More in WordPress Tutorial
PayPal donate button in WordPress
How to Add a PayPal Donate Button to WordPress

Close