Is it possible to change product_brand in the filter URL to brand
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Support notice: Our support team will be on vacation from August 8 to September 3, so response times may be delayed and replies may be irregular.
Quote from Jonathan on July 9, 2026, 15:27Hi,
I have added the WooCommerce native Brand as a filter option. Currently when one of these is selected the URL displays as "/swoof/product_brand-". Is it possible to change it from "product_brand" to just "brand"
Thanks in advance
Hi,
I have added the WooCommerce native Brand as a filter option. Currently when one of these is selected the URL displays as"/swoof/product_brand-". Is it possible to change it from"product_brand" to just"brand"
Thanks in advance
Quote from Alex Dev on July 10, 2026, 17:15Hello Jonathan
Short answer: no, this cannot be changed out of the box.
The reason is that the key in the URL is not a label we invent, it is the real taxonomy name. WooCommerce registers its native brands taxonomy as "product_brand", and the filter uses that exact name both when it builds the filter links and when it reads them back to construct the query. There is no setting to alias it to "brand".
We did look into it properly. It is technically possible with custom code, but honestly it is a fiddly job, because the same key lives in more than one place and you have to keep both ends in sync. If you are comfortable editing code and it is really important for you, here are the three places involved:
1) Inbound, PHP. Everything the filter reads goes through one method, and it exposes a hook. You can map "brand" back to "product_brand" there, so the filtering query still resolves. Something like:
add_filter('woof_get_request_data', function($data){
if (isset($data['brand'])) {
$data['product_brand'] = $data['brand'];
unset($data['brand']);
}
return $data;
});2) Outbound, JavaScript. The filter link is assembled in js/front.js, in the loop that builds the URL. There you would rename "product_brand" to "brand" as the link is put together (the plugin already does the same kind of rename for "page" to "paged" right next to it). Note this is an edit inside a plugin file, so it would be overwritten on the next update unless you maintain it as a patch.
3) Optional, WordPress core. Only needed if you also want a direct URL like ?brand=slug or a pretty /brand/slug/ permalink to resolve outside the live filter. For that you would add the standard query_vars and request filters to translate "brand" into "product_brand" before WP_Query runs.
So it is doable, but it is three moving parts, one of them a JS edit you would have to carry across updates.
Frankly, if a clean "brand" in the URL is the goal, I would give you a different and much simpler recommendation: do not use WooCommerce's native product_brand taxonomy for this at all. Register your own custom taxonomy with the slug "brand" by https://wordpress.org/plugins/custom-post-type-ui, attach it to the product post type, and use that one for your brands. Then "brand" is the real taxonomy name, the filter will output it in the URL automatically, and you need none of the code above and nothing to maintain across updates.
The only trade-off is that you would not be using WooCommerce's built-in Brands panel and anything tied specifically to product_brand. But for a brand attribute you simply want to filter by, with a clean URL, this is by far the least effort and the most robust.
If you decide to go the custom taxonomy route and want a hand making sure it shows up correctly in the filter, just let us know and we will guide you.
Hello Jonathan
Short answer: no, this cannot be changed out of the box.
The reason is that the key in the URL is not a label we invent, it is the real taxonomy name. WooCommerce registers its native brands taxonomy as"product_brand", and the filter uses that exact name both when it builds the filter links and when it reads them back to construct the query. There is no setting to alias it to"brand".
We did look into it properly. It is technically possible with custom code, but honestly it is a fiddly job, because the same key lives in more than one place and you have to keep both ends in sync. If you are comfortable editing code and it is really important for you, here are the three places involved:
1) Inbound, PHP. Everything the filter reads goes through one method, and it exposes a hook. You can map"brand" back to"product_brand" there, so the filtering query still resolves. Something like:
add_filter('woof_get_request_data', function($data){
if (isset($data['brand'])) {
$data['product_brand'] = $data['brand'];
unset($data['brand']);
}
return $data;
});
2) Outbound, JavaScript. The filter link is assembled in js/front.js, in the loop that builds the URL. There you would rename"product_brand" to"brand" as the link is put together (the plugin already does the same kind of rename for"page" to"paged" right next to it). Note this is an edit inside a plugin file, so it would be overwritten on the next update unless you maintain it as a patch.
3) Optional, WordPress core. Only needed if you also want a direct URL like ?brand=slug or a pretty /brand/slug/ permalink to resolve outside the live filter. For that you would add the standard query_vars and request filters to translate"brand" into"product_brand" before WP_Query runs.
So it is doable, but it is three moving parts, one of them a JS edit you would have to carry across updates.
Frankly, if a clean"brand" in the URL is the goal, I would give you a different and much simpler recommendation: do not use WooCommerce's native product_brand taxonomy for this at all. Register your own custom taxonomy with the slug"brand" by https://wordpress.org/plugins/custom-post-type-ui, attach it to the product post type, and use that one for your brands. Then"brand" is the real taxonomy name, the filter will output it in the URL automatically, and you need none of the code above and nothing to maintain across updates.
The only trade-off is that you would not be using WooCommerce's built-in Brands panel and anything tied specifically to product_brand. But for a brand attribute you simply want to filter by, with a clean URL, this is by far the least effort and the most robust.
If you decide to go the custom taxonomy route and want a hand making sure it shows up correctly in the filter, just let us know and we will guide you.
Quote from Jonathan on July 11, 2026, 17:59Hi,
Many thanks for the reply.
I was using the product attribute for the brand previously but recently switched to the native WooCommerce Brand feature as it provided better compatiblity with other plugins/features.
I wanted to check if it was possible so that I didn't have to change some of my links manually that were previously just using brand, however I will just stick with using product_brand in the URL and go through and change the links.
Thanks
Jon
Hi,
Many thanks for the reply.
I was using the product attribute for the brand previously but recently switched to the native WooCommerce Brand feature as it provided better compatiblity with other plugins/features.
I wanted to check if it was possible so that I didn't have to change some of my links manually that were previously just using brand, however I will just stick with using product_brand in the URL and go through and change the links.
Thanks
Jon
Quote from Alex Dev on July 13, 2026, 13:39Hello Jon
Before you start editing links by hand, it is worth setting up a redirect instead. It covers every old link at once, including the ones you cannot edit: search engine results, bookmarks, and links from other sites. Two ways to do it, pick whichever fits your setup.
Assuming your old links looked like this:
https://your-site.com/shop/swoof/brand-nike/
and the new ones look like this:
https://your-site.com/shop/swoof/product_brand-nike/
Option 1: .htaccess (Apache)
This is the fastest one, because the redirect happens in the web server, before WordPress and before any plugin is even loaded. Add this above the standard "# BEGIN WordPress" block:
RewriteEngine On RewriteCond %{REQUEST_URI} /swoof/ RewriteRule ^(.)/brand-(.)$ /$1/product_brand-$2 [R=301,L,NE]
The condition limits it to filter URLs only, so nothing else on the site is touched. Note that the rule matches "/brand-" with the leading slash, so it will not match "/product_brand-" and cannot loop on itself.
If your server runs nginx rather than Apache, .htaccess is ignored, and you need option 2.
Option 2: PHP, in your child theme functions.php
This works on any server. It runs on the earliest hook available from a theme file, so the redirect happens before the page is built:
add_action( 'after_setup_theme', function () { if ( is_admin() || wp_doing_ajax() ) { return; } $uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; // only touch filter URLs if ( strpos( $uri, '/swoof/' ) === false ) { return; } // "/brand-" becomes "/product_brand-" // the leading slash matters: it prevents matching "/product_brand-" again $new_uri = preg_replace( '~/brand-~', '/product_brand-', $uri ); if ( $new_uri AND $new_uri !== $uri ) { wp_safe_redirect( $new_uri, 301 ); exit; } } );
If you want it to run even earlier, before plugins load, put the same code into a small file in wp-content/mu-plugins/ and hook it on muplugins_loaded instead. For a handful of old links that is overkill, but the option is there.
Two practical notes
While testing, use 302 instead of 301. A 301 is cached hard by browsers, and if you get the pattern slightly wrong you will keep hitting the stale redirect from your own browser cache. Once you confirm it works, change it to 301, which is the one search engines act on.
Adjust the old key in the pattern to whatever your old links actually contained. If your previous brand links came from a product attribute, the key in the URL would have been pa_brand rather than brand, in which case replace "brand-" with "pa_brand-" in the rule.
Either option means you can leave your existing links alone.
Welcome!
Hello Jon
Before you start editing links by hand, it is worth setting up a redirect instead. It covers every old link at once, including the ones you cannot edit: search engine results, bookmarks, and links from other sites. Two ways to do it, pick whichever fits your setup.
Assuming your old links looked like this:
https://your-site.com/shop/swoof/brand-nike/
and the new ones look like this:
https://your-site.com/shop/swoof/product_brand-nike/
Option 1: .htaccess (Apache)
This is the fastest one, because the redirect happens in the web server, before WordPress and before any plugin is even loaded. Add this above the standard"# BEGIN WordPress" block:
RewriteEngine On RewriteCond %{REQUEST_URI} /swoof/ RewriteRule ^(.)/brand-(.)$ /$1/product_brand-$2 [R=301,L,NE]
The condition limits it to filter URLs only, so nothing else on the site is touched. Note that the rule matches"/brand-" with the leading slash, so it will not match"/product_brand-" and cannot loop on itself.
If your server runs nginx rather than Apache, .htaccess is ignored, and you need option 2.
Option 2: PHP, in your child theme functions.php
This works on any server. It runs on the earliest hook available from a theme file, so the redirect happens before the page is built:
add_action( 'after_setup_theme', function () {
if ( is_admin() || wp_doing_ajax() ) {
return;
}
$uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '';
// only touch filter URLs
if ( strpos( $uri, '/swoof/' ) === false ) {
return;
}
//"/brand-" becomes"/product_brand-"
// the leading slash matters: it prevents matching"/product_brand-" again
$new_uri = preg_replace( '~/brand-~', '/product_brand-', $uri );
if ( $new_uri AND $new_uri !== $uri ) {
wp_safe_redirect( $new_uri, 301 );
exit;
}
} );
If you want it to run even earlier, before plugins load, put the same code into a small file in wp-content/mu-plugins/ and hook it on muplugins_loaded instead. For a handful of old links that is overkill, but the option is there.
Two practical notes
While testing, use 302 instead of 301. A 301 is cached hard by browsers, and if you get the pattern slightly wrong you will keep hitting the stale redirect from your own browser cache. Once you confirm it works, change it to 301, which is the one search engines act on.
Adjust the old key in the pattern to whatever your old links actually contained. If your previous brand links came from a product attribute, the key in the URL would have been pa_brand rather than brand, in which case replace"brand-" with"pa_brand-" in the rule.
Either option means you can leave your existing links alone.
Welcome!
