Over the past few years I’ve written several tutorials on how to create Custom Post Types in the WordPress admin. I’ve also created a large number of walk-throughs and videos on how to show your Custom Post Types on the front-end of your site. In this article I’m looking at a missing piece, and that is creating schema markup for your Custom Post Type. I’m going to first briefly look at why this is important and what the SEO schema is, and then look at four plugins to help you create it: SEOPress Pro, Rank Math Pro, Schema Pro, and uSchema.
The video version has the full overview of what schema is and why it is important. It also has more of a step-by-step look at the 4 plugin options. The text version is more of an overview and discussion.
Example Book Review
I have a test website with a Book Custom Post Type using the CPT-UI and Advanced Custom Fields plugin. I have added to the Book Custom Post Type all of the custom fields needed for book review schema. Here are the custom fields in the editor: book description, book title, author’s name, book ISBN, author’s website link, author’s photo, review rating and publication date.
Here is the book review on the front-end, including the review rating. The problem is that when we test this page using Google’s schema testing tool, Google does not find anything special to help it understand what kind of content it is. However, if we add schema markup then search engines will know what type of content it is, the page will rank higher, and hopefully we will get more visitors reading our reviews.
Schema, or Structured Markup, is information that is written into the code of your webpages. It is “structured” meaning that it follows certain rules about what it contains and the format. Because it is structured and follows rules then search engine bots can read it. If the bot understands what it sees then it makes it easier for the bot to understand and index it. If it doesn’t exist then the bot guesses. If there are errors then it ignores it.
There is a website, schema.org, that provides the official information about the different types of schema. The standard was developed by Google, Microsoft, and Yandex. There are literally hundreds of different types of schema that are used to describe many of the different types of data that you would find online. You can go to this website to find the schema
I typed into the search box in the right part of the site header the word “book” and there were 99 results. There is of course the “book” schema type, but there are also a number of other related schema types, such as “Chapter,” “Book Series,” “BorrowAction,” and “Review.” There is also a “property” called “bookFormat.” So, we have types and properties. The Review type is interesting in my case, because it is a schema type, Review, about another schema type, Book.
The Review type is interesting in my case, because it is a schema type, Review, about another schema type, Book. This is where things start getting interesting. A schema type is built up of other schema types and of properties.
The Book type is composed of two main types, Book and CreativeWork type ones related to it. The Book type has a few types and properties unique to books and the CreativeWork Of course each of these is composed of other types and each of the types has properties.
For example, CreativeWork has an Author type. If we look at the Author type we see it can be an Organization or Person type. It is used in CreativeWorks and Rating types.
If we drill down we see that the Person type has types and properties and also has some from the Thing type. At the bottom of each schema type there are some examples. Here is a Person example. It has the name, address, colleagues, email, image, jobTitle, and so on.
There is a challenge when creating schema to figure out how to go about structuring your schema and which of the data points are required. For example, the Book schema type has a Review node and the Review type has an ItemReviewed node that can be of type Book. Fortunately, we don’t have to figure this out on our own. There are plugins to help us create it and add it to our pages.
Schema Types and the Four Contenders
I’m focusing on creating the schema for book reviews, but a note about the four plugins being considered. There are a number of schema types that are usually configured on a higher level than the post. All four plugins help you to create this site schema. Here, though, we are focusing on the schema for Custom Post Types.
At this point I was already imaging readers pointing out that the pro versions of SEOPress and RankMath both supplied schema options. Why install another plugin? So, I spent some time exploring these SEO powerhouses.
I remembered that I have the Schema Pro plugin. I thought, I’d see how the Schema Pro plugin handles creating schema for a book review. Schema Pro is made by Brainstorm Force, the same company behind the Astra theme. It is included in the Astra Growth Bundle, which I’ve always thought was a good value.
Then I noticed the uSchema plugin was on AppSumo and I thought I’d also test it to generate the correct schema for a book reviewThe uSchema, plugin is usually only available on CodeCanyon for $59 a site, but for a while it is on AppSumo for $59 for 3 sites or $99 for unlimited sites. uSchema is a dedicated solution for just creating structured data schema. It has a decent knowledge base and a number of how-to videos.
Testing the Four Schema Plugins
The first plugin I tested with the SEOPress Pro plugin. This is the plugin I’ve been using on the WebTNG website. I think that it does a good job, but the settings can be a bit of a maze. SEOPress has several schema types. There was no book type, but there was a review type.
I gave the schema a name, “Book Review Schema,” and picked that I wanted to be shown for Books. There were not really a lot of field options, but I filled them in. The process is to map post fields and custom fields to the properties required by Schema.org. SEOPress Pro had nice drop downs to pick from, which make it easy.
Here is the result, which Google identified. Not too hard to create and the schema is valid, but I noticed that there isn’t really a lot of information about the book itself. Well, that is what you get with the SEOPress easy mode.
SEOPress Pro also has an advanced, custom schema option. Here you don’t have a UI for creating it. Instead, you paste in your JSON markup and SEOPress gives you a bunch of dynamic variables you can use in it so that you can create a template. That is not that easy, but doable.
Rank Math Pro
Rank Math Pro has 19 pre-defined schema types to choose from, more than SEOPress. Interesting that there is a Book type but not a Review type. This is the opposite of SEOPress, however, it seemed that the Rank Math options each has a place to add some review information! This made it feel that these pre-defined schema options all had a review slant.
I started with the Book schema and added the rating fields. Unlike SEOPress, Rank Math did not have any drop downs to select fields. Instead, you have to add some magic tags, or dynamic variables, to each field.
The Rank Math knowledge base has a page with the list of available variables.
Rank Math has a basic mode and an advanced mode editor. I found that I needed to go into the advanced more to create the schema because the rating field was a number incrementor when on basic, which meant that I couldn’t add the dynamic variable for the custom field. This was easy to fix in the advanced editor. I liked the editor because it showed the composite types and properties properly nested. Here is the result, which also was a bit basic. In the advanced editor I could have expanded this.
Schema Pro had 17 types to pick from. I looked at the book type, but the Schema Pro editor doesn’t have the option to add additional fields.
So I picked the Review type instead. A very nice thing about the Schema Pro is that the Review schema types gives you an option to pick what is being reviewed. When I picked Book as the Review Item Type then a number of additional book related fields showed. Schema Pro also allowed me to pick fields from a list, but it was faster and it did a good job of filtering out custom fields that had been added by a theme or other plugin to hold settings options. It showed the ACF fields nicely together. I mapped the post, site, and custom fields to the schema fields. This was very straightforward and intuitive.
Here is the result which I found to have a good balance of information about the review and the book being reviewed.
Lastly I tried the uSchema plugin. uShema has a fair number of help tutorials and videos. I watched a couple of hours of videos to figure out how to use it. It does not have a Review type, but does have a book type. Like Rank Math, it has a simple mode and advanced mode. I took a look at the Book type, but the pre-defined types are all basic mode and you can’t add fields to them. You can import into the advanced mode a simple type, however, while you can reorder the properties, you can not change the nesting and level of them, so consequently, I had to go into the advanced more and start from scratch. I tied starting importing the Book type into the advanced mode editor and then adding a review section, but could not get that to be picked up so I actually used the schema definition from Schema Pro as a model. It took a while to enter all of the types and properties. Also, the editor is a bit laggy and doesn’t show the nesting as nicely as the Rank Math editor. On the positive side, you could select the type, property, and fields values from drop downs and it seemed the lists included all of the currently defined schema types. This just gave you the names, however, it did not import all of the schema.
In addition to setting the rules in the schema area, you also had to go to the settings area and repeat the process, which seemed a bit odd. The uSchema input was picked up by the Google schema testing tool, so it worked, but you needed to bring a schema definition and enter it manually.
Discussion and Conclusions
In general, we saw that search engines may not on their own detect the type of content that your have created in your Custom Post Types. We need to tell them what the content is all about. There is a consortium that created a type of markup structured language and the authoritative source for information about that is the schema.org website.
The schema itself can be a bit complex. The schema is a composite of different types and each type has its own properties and nested schema types. We saw that book review schema, as an example, can be either based on a Book type with review information added to it or the other way around, a Review type with book information. Fortunately we have plugins to help us create schema.
Each plugin worked a bit differently:
With SEOPress you could pick fields from a drop down but if you needed to customize the schema then you would need to create the JSON and add in dynamic variables.
Rank Math had a pretty good editor, but it was a bit odd that all of the schema types focused on adding a review section. So, going with the Book schema type and adding the review fields, the actual book information that was output in the final result was pretty thin. I liked the editor and the way it showed the types and property nesting. You were not able to pick fields from a drop down, which was not as convenient, but you could customize the schema as you needed to.
The Schema Pro plugin provided a Review schema. It allowed you to pick fields from a drop down and did a good job showing ACF fields and not showing settings fields from the theme or other plugins. It had a custom schema option, but since there are not dynamic variables, you wouldn’t be able to create a template to apply dynamically to a Custom Post Type.
uSchema was for me the hardest to use. I spent a few hours before recording the video looking at the help docs and videos on their YouTube channel. I also tried starting with their Book schema option and adding the Review fields, but I was not able to get the schema picked up by the Google test tool. That could have totally been user error, but my point is that even after availing myself of the support resources the only successful method for me was to create it from scratch. It does have an editor that allows you to go into advanced mode, which is nice, but it was the slowest solution.
My conclusions are that if your SEO plugin has a schema option that actually fits your needs and you are happy with, then that is the easiest solution.
SEOPress Pro was pretty straightforward, but didn’t have an user interface / editor for creating advanced schema. Rank Math had the most advanced editor which was at least on par with the dedicated uSchema editor, but their predefined schema types were not as rich as they could be. So, for something advanced you would need to go into manual mode, but Rank Math gives you the tools.
The Schema Pro plugin was the easiest to use and out of the box it gave the richest results about the Book Review of any of the predefined options. It would be my first choice if it has the schema you need. Too bad it doesn’t have an advanced editor. Rank Math Pro would be my second choice. SEOPress Pro my third choice and uSchema was doable, but a pain.
So that is my walk-through and review of four options for adding schema markup for your Custom Post Types. I hope you found this post helpful.
Schema Pro can be purchased by itself or as part of the Astra Growth Bundle. There is a lifetime option.