Get AI SEO for FREE.

Learn More!

Setting a Custom Brand for Your WooCommerce Store with Rank Math

In this knowledgebase article, we’ll show you how to set a custom brand for your WooCommerce Store using Rank Math.

How to Set a 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

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

Adding the brand value fixes the below warning:

Fix the warning by adding Brand Value

After adding a custom brand name your product’s page source will look like this:

Custom Option in Rank Math

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.

Head over to Appearance → Theme File Editor (for Classic Theme) from your WordPress admin area.

Navigate to Theme File Editor

In the case of Block Theme, navigate to WordPress Dashboard → Tools → Theme File Editor, as shown below.

Theme File Editor in Block Theme

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

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

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

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.

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles