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.
You can customize this filter to add Brand to your product:
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
$entity['brand']['@type'] = 'Brand';
$entity['brand']['name'] = 'Your Brand name';
return $entity;
});
And here’s a link to how to apply this to your site:
https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php
Once done, clear your website’s cache and check the product using Google’s Rich Results test tool.
I hope that helps.
Thank you.
Thanks for your reply, would the filter only add the same brand name to all of my products?
Hello,
Yes, that would apply to all pages with the product schema in them.
If you wish to apply the brand dynamically or in a specific product, you may need to further customize the code. If you are not sure about this, you may hire an expert to create the logic for you.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
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.