Answer the question
In order to leave comments, you need to log in
How to make Woocommerce permalinks for category and products the same?
Hello.
The client wants the Product category base to have the Products category
and also the Product Permalinks to also start with Products.
The problem is that when I do Product category base -> Products, and Product Permalinks -> Products, then a 404 error appears, and if I do, for example, Product Permalinks -> Product, then everything is ok.
But you need exactly Product category base -> Products and Product Permalinks -> Products, how to do it?
Answer the question
In order to leave comments, you need to log in
WordPress uses the base in the url to determine what the content type is and what request to make. Therefore, the same base for different types is not an option. The fact is that your beautiful url for it looks like this:
/products/sample-product/ - урл для человека
/products/([^/]+)(?:/([0-9]+))?/?$ - правило, по которому WP его парсит
index.php?product=sample-product&post_type=product&name=sample-product - вот во что он превращается для ядра
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question