M
M
Max_Borisov2019-09-12 16:20:51
WordPress
Max_Borisov, 2019-09-12 16:20:51

CNC Wordpress for taxonomies?

Good afternoon!
There is a hierarchy of categories:
- Catalog
--- Cars
----- Alfa Romeo
----- Audi
----- BMW
--- Trucks
----- Alfa Romeo
----- Audi
-- --- BMW
That is, different types of vehicles can have brands of cars. Task, such pages:
site.ru/catalog/ - page with car types.
site.ru/catalog/legkovyi - page with car brands from the category of cars.
site.ru/catalog/legkovyi/bmw - page of goods of a specific brand and type of car.
site.ru/catalog/legkovyi/bmw/tovar - product page
There is an option to make the car type and brand different taxonomies. Add new cnc rewrite rules for the catalog page.
But then what to do with broken links like site.ru/catalog/legkovyi/bred or site.ru/catalog/bred/bmw, which, in fact, should throw at 404?
Or do you need to parse query variables, check if there is info in the database, if not, then redirect to 404?
Maybe there is a more elegant solution?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question