In this knowledgebase article, we’ll show you how to set a custom brand for your WooCommerce Store using Rank Math.
Table Of Contents
How to Set Custom Brand Name? PRO
In Rank Math’s WooCommerce settings, which can be found by navigating to Rank Math SEO → General Settings → WooCommerce in your WordPress admin area, you’ll find a dropdown menu for the Select Brand setting.
Rank Math has added a Custom option in it. This option will add the custom Brand Name to the Product Schema. This is useful if you’re seeing brand name-related warnings in Google’s Schema testing tools or in your Search Console.
If you want to use custom value for your brand then select the Custom option from the drop-down list.
![Custom Option in Rank Math](https://rankmath.com/wp-content/uploads/2021/01/Custom.jpg)
Once you select Custom you’ll be able to add a Brand value that you want to use in Schema.org and OpenGraph markup. Once done save your changes.
![Add Brand Value](https://rankmath.com/wp-content/uploads/2021/01/Brand.jpg)
Adding the brand value fixes the below warning:
![Fix the warning by adding Brand Value](https://rankmath.com/wp-content/uploads/2021/03/missing-field-brand.jpg)
After adding a custom brand name your product’s page source will look like this:
![Custom Option in Rank Math](https://rankmath.com/wp-content/uploads/2021/03/custom-brand-name.jpg)
How to Set Custom Brand Name Using Filter?
If you’re using the Rank Math free version, then you may not see the Custom option under the Select Brand setting as shown above. In that case, you can simply use a filter to set your custom brand name by following the steps discussed below.
1 Navigate to the Theme File Editor
Head over to Appearance → Theme File Editor (for Classic Theme) from your WordPress admin area.
![Navigate to Theme File Editor](https://rankmath.com/wp-content/uploads/2022/03/Navigate-to-Theme-File-Editor.png)
In the case of Block Theme, navigate to WordPress Dashboard → Tools → Theme File Editor, as shown below.
![Theme File Editor in Block Theme](https://rankmath.com/wp-content/uploads/2022/05/Theme-File-Editor.png)
Then, choose rank-math.php from the list of theme files shown on the right side of the screen.
![Open rank-math.php in theme file editor](https://rankmath.com/wp-content/uploads/2021/11/Open-rank-math.php-in-WordPress-Theme-Editor.png)
Or, navigate to Tools → Theme File Editor from the WordPress dashboard (for Block Themes). And, add the code to the rank-math.php
file from the theme files. Then save the settings by simply clicking the Update File button.
2 Add the Code Snippet
In the code editor (displayed in the middle of your screen), copy-paste the following code snippet. Make sure to replace Rank Math
with your brand name in the code snippet.
/**
* Filter to add custom Brand for WooCommerce Products.
*
* @param array $entity Snippet Data
* @return array
*/
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
$entity['brand']['@type'] = 'Brand';
$entity['brand']['name'] = 'Rank Math';
return $entity;
});
And then click the Update File button.
![Add code snippet for custom brand name](https://rankmath.com/wp-content/uploads/2021/09/Add-code-snippet-for-Brand-name.jpg)
3 Check Schema Markup
Now you can check your page with Google’s Rich Results Testing Tool to see if your brand name has been added.
![Custom brand name added to WooCommerce Product Schema](https://rankmath.com/wp-content/uploads/2021/09/Custom-brand-name-added-to-Product-Schema.jpg)
And, that’s it! This is how Rank Math allows you to add a custom name to your brand easily. Hence we strongly recommend you install the Rank Math plugin and enjoy its features. If you still have absolutely any questions, please feel free to reach our support directly from here, and we’re always here to help.