posts archive page within custom taxonomy
-
Hi there,
I hope someone can help me with this! I would certainly appreciate it!!
I am currently working on a project where a custom taxonomy Location is the centre of the website.
This is used to create a location-based-search within the site.
Now, I have created several custom posts which can all be connected to the location-taxonomy. When a visitor opens the website, his location gets selected with help of GeoLocation. After that, the visitor gets redirected to: https://www.example.com/location/cityThis page shows information, news and events about the location. This is done with taxonomy-location.php.
A custom post type company is connected to the location taxonomy. When a visitor click on the link: show companies, it needs to get redirected to: https://www.example.com/location/city/companies
however, it gets redirected to: https://www.example.com/companies/a-random-company-name
This is showing the content from index.php. In stead of archive-company.php.
2 things, 1; there must be no redirection and 2; https://www.example.com/location/city/companies needs to address archive-company.php (and ofcourse, https://www.example.com/location/city/companies/a-company needs to address single-company.php).
How can I achieve this?
I hope someone can help me!!
With kind regards,
Douwe
- The topic ‘posts archive page within custom taxonomy’ is closed to new replies.