# How To Fix The Invalid Object Type For Brand In Schema

> If you're getting an error for the "Brand" in your structured data schema code, here's what you need to do to fix it.

- Author: [Bhagwad Park](https://www.namehero.com/blog/author/bhagwad-park/)
- Published: 2021-10-13
- Updated: 2021-10-13
- Category: [SEO Tips](https://www.namehero.com/blog/category/seo-tips/)
- Web page: https://www.namehero.com/blog/how-to-fix-the-invalid-object-type-for-brand-in-schema/

A few days back, I got this warning message in the Google search console concerning my review of NameHero on my site WP-Tweaks:
 [![Invalid Object Type for Field Brand](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130147/Invalid-Object-Type-for-Field-Brand-1024x554.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130147/Invalid-Object-Type-for-Field-Brand.png)Invalid Object Type for Field Brand

This was a structured data error, which was surprising, considering I hadn’t changed any structured data for this particular page – at least nothing which could have led to this error. I’ve been using the same structured data review template for a long time and even wrote a tutorial about the [best way to include a review schema on your site](https://www.namehero.com/blog/json-structured-data-template-for-reviews/).

On digging deeper, I saw that the problem was coming from the following lines:
 [![Thing is Not a Valid Object Type for Brand](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130145/Thing-is-Not-a-Valid-Object-Type-for-Brand-1024x598.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130145/Thing-is-Not-a-Valid-Object-Type-for-Brand.png)Thing is Not a Valid Object Type for Brand

According to this, the “brand” field didn’t allow the “type” attribute to be a “Thing”. I don’t know how or why they changed this, or maybe the Google search console only now decided to include it as a warning. However, I’m pretty sure that it used to be correct because I based my structured data on the code provided by Google themselves. So it’s possible that Google was misinterpreting the standard from the very start.

Whatever the reason, I now had to fix the warning! So I checked out the schema documentation for the “Brand” field on [https://schema.org/brand](https://schema.org/brand), and saw that there were now only two possible values:

1. Brand
2. Organization

I had to decide whether the NameHero I was promoting referred to a brand or an organization. Very often these two are the same thing, but not always since a single organization can have many brands. So for this case, I decided to go with “Brand”.

## Fixing the JSON “Review” Structured Data

In my previous posts, I’ve recommended adding [JSON structured data to WordPress using the “Custom HTML” block](https://www.namehero.com/blog/using-json-in-wordpress-best-practice/), as this gives you maximum control over the fields. If I was using a plugin, I might not have been able to make the change as easily since the plugin author would have had to update the code, push the release, and I would need to accept the update. But since we’re just using an ordinary block for the JSON code, making the change is trivial.

Just change “Thing” in the above screenshot to “Brand” in the appropriate place as shown here:
 [![Change Object Type from Thing to Brand](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130133/Change-Object-Type-from-Thing-to-Brand-1024x483.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130133/Change-Object-Type-from-Thing-to-Brand.png)Change Object Type from Thing to Brand

In the above example, I’m testing the changes using the [Google Rich Results Testing tool](https://search.google.com/test/rich-results), so I can paste the code for my HTML page directly into the editor and it will test the code. This way, I can make changes to my JSON and see if they work before I put them into production.

After changing “Thing” to “Brand”, you can see that the error disappears:
 [![Brand Problem Fixed](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130128/Brand-Problem-Fixed-1024x608.png)](https://blogcdn.namehero.com/startup/wp-content/uploads/2021/10/13130128/Brand-Problem-Fixed.png)Brand Problem Fixed

After making several of these changes to various products on my site, the errors vanish and Google is happy again ?

## Schema Plugins vs Custom HTML Code Block

A huge reason why this problem is easy to solve is that I use the custom HTML code block in WordPress to write my review schema. As mentioned above, plugins come with a lot of extra baggage, which makes them inflexible. So while a plugin might have an easy interface to construct the structured data schema, it’s still better to do it manually with blocks of JSON code! This way, making changes just takes a few minutes of testing and you’re done.

I think that the custom HTML code block is one of the best innovations from the WordPress team compared to the old editor, and it has single-handedly changed my opinion of the Gutenberg update. Using it for writing JSON schema code is just one of the many uses.

## Related posts

- [What Is ERR_CERT_COMMON_NAME_INVALID, And How Can You Fix It?](https://www.namehero.com/blog/what-is-err_cert_common_name_invalid-and-how-can-you-fix-it/)
- [How To Fix Error Code: NET::ERR_CERT_DATE_INVALID](https://www.namehero.com/blog/how-to-fix-error-code-neterr_cert_date_invalid/)
- [How To Fix “Sorry, this file type is not permitted for security reasons.”](https://www.namehero.com/blog/how-to-fix-sorry-this-file-type-is-not-permitted-for-security-reasons/)
- [How To Fix Error Code: NET::ERR_CERT_AUTHORITY_INVALID](https://www.namehero.com/blog/how-to-fix-error-code-neterr_cert_authority_invalid/)
