Change brand url structure
-
I need to remove the term “?filter_brand=” in the brand url structure
url: /shop/?filter_brand=name
Need to change to: /shop/name
I also tested the snippet bellow but it didn’t work
add_filter( 'woodmart_brands_link', function( $link, $brand ){
return get_term_link( $brand->term_id, $brand->taxonomy );
}, 10, 2 );
Hello,
You need to enable Enable archive
option for a brand attribute in Dashboard -> Products -> Attributes -> edit your brand attribute.
Regards
It worked, however I tried to change the Slug “brand” to “shop” and it didn’t work, if I change Slug “brand” to any other it doesn’t seem to work.
Hello,
You can delete and create a new attribute but you cannot change the slug.
Best Regards
How do I change the URL structure?
I just want change /brand/name to /shop/name
Sorry, but it is not possible to do this since /shop/name is reserved for categories pages.
I want to redirect the URL to the brand category not for another brand page (filtered shop page). I don’t want 2 URLs with the same brand content because this is not a good idea for SEO.
So I just need to redirect the URL to the Brand category /shop/brand. How is it possible?
In this case, you will need to create a category with the name of this brand. Then you will have such URL. It is not possible to have attribute URL the same as category URL in WooCommerce.
ok, But I can only use the term “brand” in the attribute? I’ve tried to change Slug to something else and it stop working.
After attribute slug change you need to resave permalinks in Dashboard -> Settings -> Permalinks. If it will not work, then you will need to create a separate attribute.