I resolved. I have changed in the class.yith-wcbr.php file.
Hi redisztribucio,
I’m sorry for my late response; I hope this answer will still help you
I’d avoid to change plugin’s files directly
Indeed, I’d rather use yith_wcbr_taxonomy_rewrite filter, that lets you customize rewrite slug for brand taxonomy
EG, you could add something similar to functions.php file of your theme
if( defined( 'YITH_WCBR' ) && ! function_exists( 'yith_wcbr_change_rewrite_rule' ) ){
function yith_wcbr_change_rewrite_rule( $rewrite ){
return 'something';
}
add_filter( 'yith_wcbr_taxonomy_rewrite', 'yith_wcbr_change_rewrite_rule' );
}
Please, don’t forget to regenerate your permalinks after you added this code, simply navigating to WP Dashboard -> Settings -> Permalinks and saving your options as they are
Have a nice day 🙂
Mr. W
(@gabriel-winnberg)
Do I need a special rewrite rule for Nginx for this to work?
-
This reply was modified 9 years, 2 months ago by
Mr. W.
Backup and then try as following:
Please change line 123-125 of wp-content/plugins/yith-woocommerce-brands-add-on/include/class.yith-wcbr.php
'slug' => apply_filters( 'yith_wcbr_taxonomy_rewrite', 'xxxxx' ),
'hierarchical' => true,
'with_front' => apply_filters( 'yith_wcbr_taxonomy_with_front', true )
***change the xxxxx to anything you like.
Change again every update.
-
This reply was modified 9 years, 2 months ago by
Watch Teller.
-
This reply was modified 9 years, 2 months ago by
Watch Teller.
Mr. W
(@gabriel-winnberg)
This works, thanks!
But can it be added it via functions.php?
I’m still waiting the plugin developer to update the snippets for function.php
Subscribe this thread will do.
Hope very soon (free plugin)
^.^
Mr. W
(@gabriel-winnberg)
I got it to work using the snippet above plus the snippet from here:
https://wordpress.org/support/topic/brand-slugs/#post-8427732
Change ‘custom-brands-slug’ to whatever and add to functions.php:
// Remove Brands base
add_filter( ‘yith_wcbr_taxonomy_with_front’, ‘__return_false’ );
// Rename Brands slug
if( defined( ‘YITH_WCBR’ ) && ! function_exists( ‘yith_wcbr_change_rewrite_rule’ ) ){
function yith_wcbr_change_rewrite_rule( $rewrite ){
return ‘custom-brands-slug’;
}
add_filter( ‘yith_wcbr_taxonomy_rewrite’, ‘yith_wcbr_change_rewrite_rule’ );
}
Wow… thanks you very much… much…