Invalid object type for field “brand”

#294249
  • Resolved Richardj
    Rank Math free

    My products use the WooCommerce Product schema which worked well until recently. Now, Google search console gives me the error: Invalid object type for field “brand”

    After researching this, I believe it is because the brand type is ‘Thing’, and the new standard is that it should be ‘Brand’.

    This is a tiny startup site, so I’m not a paid user and don’t have the ability to edit the schema for WooCommerce Product. Will you be changing the plugin to conform with the new standards or is there anything else I can do?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    The Custom Brand is available only in the PRO version. You can add the filter given below in your theme’s functions.php file to use a custom brand for the Schema:

    // Add Brand for Products.
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    $entity['brand'] = 'Rank Math'; // Enter your brand name 
    return $entity;
    });

    Once done, try clearing your website cache completely and run the tests again.

    I hope that helps.

    Thank you.

    Thanks for your reply, however, that is the snippet I was already using, and it no longer works.

    I believe this snippet needs to be updated so that the brand type is ‘Brand’, and not ‘Thing’.

    Hello,

    Please use the filter given below to fix the issue with the brand field:

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    	$entity['brand']['@type'] = 'Brand'; 
    	$entity['brand']['name'] = 'Rank';
    	return $entity;
    });

    Hope this helps. Let us know if you need any other assistance.

    Thanks.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Invalid object type for field “brand”’ is closed to new replies.