When you use a search engine, you’ll typically get back hundreds or thousands of results. Most people tend to gravitate towards the first ones for expediency’s sake. However, the way each website looks in those results pages also influences which one gets picked.

By using ’schema markup’, you can tweak the way your site’s results appear in search engines. There are limits to what you can do, of course, but even subtle changes can help your pages grab searchers’ attention. That, in turn, can lead to more clicks.

In this guide, we’re going to talk about what schema is and why it’s important. Then we’ll go over how to add schema to WordPress. Let’s talk markup!

What Is Schema?

Schema is a markup language you can use to optimize your pages for search engines. To put it another way, by using schema, you can give search engines more information about the type of content your pages include.

Plus, you can also use schema to modify the way your pages show up in search engines. Here’s a quick look at what a normal, schema-less result looks like in Google:

what is schema

Now, here’s the same result modified by schema markup:

website schema

The difference is clear as day. As you might imagine, a lot of people will gravitate towards that second type of result, which is called a ‘rich snippet’. In case that’s not enough, however, let’s talk about some of the other advantages of using schema markup.

Why Are Schemas Important?

It’s not mandatory to use schema on your website. However, the benefits are readily apparent. Adding this type of data to your pages:

Imagine, for example, that you’re publishing a new recipe on your WordPress blog. By using schema markup, you could add a rating to that recipe, include caloric information, and even display how long it takes to cook.

You can then have all that information show up in the SERPs, looking like this:

importance of schema

If you put two recipe results for the same dish side by side, we’re willing to bet that most people would click on the one using schema markup. Offering all that information makes your page look more professional and valuable.

Add Schema to WordPress Using Custom Fields

WordPress enables you to add all sorts of ’metadata’ (a type of schema) to your content. For example, you can add author information, date of publication, and other details to your posts. On top of that, the platform enables you to use ‘custom fields’ to add any type of metadata you want.

To create a custom field in WordPress, load the editor for the page or post you want to modify. Look for the Screen Options tab in the top menu, and enable the Custom Fields option within:

schemas in wordpress

A new Custom Fields widget will show up below the editor now. There, you can set a name for your new field and enter the data it will include:

schema with custom fields

You can use any name you want for the field. As far as the schema markup goes, you’ll want to use a resource such as Schema.org to help you learn how the language works. Don’t be intimidated, however – schema markup isn’t complex, and you can add as much or as little data as you want.

Once you’re done, click on the Add Custom Field button. The data will be saved alongside your content. However, for it to work, you’ll need to instruct your theme to load the custom field you just set up.

To do that, access your website via FTP using a client such as FileZilla. Once you’re in, navigate to the public_html/wp-content/themes folder. Inside, you’ll find folders for all your WordPress themes.

Open the directory for the theme you’re currently using, and look for the header.php file:

schemas and wordpress

Go ahead and open that file now. You’ll need to add a few lines of PHP at the top of the file between the <head> tags, telling it to load your custom field:

$schemamarkup = get_post_meta(get_the_ID(), ' customfield', true);
if(!empty($customfield)) {
  echo $ customfield;

Keep in mind that the customfield value is a placeholder. You’ll need to replace it with the name you set for your field earlier. When that’s done, save the changes to the file, close it, and you’re done!

Now, search engines should be able to see the schema you added to your page. We’ll teach you how to test if this is working in a moment. For now, however, let’s talk about a WordPress schema plugin that can make this task easier.

Add Schema to WordPress Using Schema Pro

There are a lot of plugins you can use to add rich snippets to WordPress. However, we’re partial to Schema Pro, thanks to its ease of use:

Add Schema to WordPress Using Schema Pro

With Schema Pro, you can choose what kind of markup you want to use for each post, and add the data you need without any fuss.

Schema Pro works with all the most popular types of content, such as articles, recipes, courses, events, and more. What’s more, when you use this plugin you won’t have to fiddle with any code, or modify your theme’s files in order to load your schema.

Configuring Schema Pro & Adding Schema Markup

If you want to use the Schema Pro plugin, we recommend that you check out the developers’ knowledge base. There, you’ll find detailed instructions on how to configure the plugin and add your first schema markup.

How to Test Schema

Regardless of which approach you use for adding schema markup, you’ll want to test to see if there are any errors within your data. For this purpose, we recommend using Google’s Structured Data Testing Tool:

how to test shcema

All you have to do is enter a URL or your schema markup, and the tool will tell you if there are any errors to worry about. Moreover, in some cases you’ll also get a preview of how your rich snippet will look, so you can make any necessary changes right away.

Alternative WordPress Schema Plugins

If you’re not a fan of Schema Pro, there are plenty of other WordPress schema plugins you can use. For example, the aptly-named Schema has a 4.5/5 rating:

schema plugins

This plugin is perfect if you want to add custom schema markup types to your content, without the need to use any code. With recipes, for example, you could just add difficulty information, and skip the star rating and all the other data you don’t care about.

Then there’s All In One Schema Rich Snippets, which has a 4/5 rating:

wordpress schema plugins

In practice, this plugin is very similar to Schema Pro. You get a lot of rich snippet types to choose from, so you can add the metadata you need in minutes. If you’re looking for a WordPress schema plugin that’s easy to use, this one is an excellent pick.

WP Engine & Schema Markup

Ranking high on SERPs is essential to most websites’ success. However, if you want your site to prosper, you’ll also need a web host that understands its needs.

With WP Engine, you get access to top-notch performance, so you’ll be able to use any schema markup tools you want. If you’re ready to get started, feel free to check out our plans!

Trusted by the brands you trust.

Get started.

Build faster, protect your brand, and grow your business with a WordPress platform built to power remarkable online experiences.