-
-
Save BFTrick/6639414 to your computer and use it in GitHub Desktop.
<?php | |
// make the categories non hierarchical for their permalinks | |
function my_woocommerce_taxonomy_args_product_cat( $args ) { | |
$args['rewrite']['hierarchical'] = false; | |
return $args; | |
} | |
add_filter( 'woocommerce_taxonomy_args_product_cat', 'my_woocommerce_taxonomy_args_product_cat' ); |
Still working for me with Wordpress 4.4 and Woocomerce 2.4.12, thanks!
Hi, how to make 301 redirects - shop/clothing/t-shirt/ to shop/t-shirt/ ?
Hi, is it possible to keep just the parent and the last subcategory in the url and remove any other sub-categories in the middle?
So instead of 'www.mysite.com/category/mens/clothing/summer/t-shirt/' we'll see 'www.mysite.com/category/mens/t-shirt/'?
Thanks.
Good. Thanks. Problems are as follows, blog articles give error 404. Have solutions?
Is this a code that need to be added in functions.php ?
My goals:
- When add new product it adds automaticly produkt (product) to the url - https://stanimirmihov.com/produkt/staven-kompleks-stavi-suhojiliq/ . Can I use instead category or tag every time instead this default line?
- Same with categories, when I browse otslabvane (weight loss) I have automaticly added text to the URL - https://stanimirmihov.com/produkt-kategoriya/otslabvane/ , Can't I just use https://stanimirmihov.com/the name of the category ?
- Same with the tags, when I browse tag otslabvane (weight loss) I have automaticly added text to the URL - https://stanimirmihov.com/produkt-etiketi/otslabvane
It would be much better If I can just use categories and sub categories only for the url and then the permalink from wordpress.
Produkt = Product ; Etiketi = Tags
Hey, does anyone know how to add a filter to include blog posts and pages? So that this setting works globally across wordpress?
You the man!