I have a WP site where there are 3 taxonomies, the main categories, companies and regions. I’m looking for them to all use the same permalink structure like:
site.com/{category-slug} site.com/{company-slug} site.com/{region-slug}
Is there a way to make this work and rewrite the urls within functions.php? I’ve tried a couple of methods, but sometimes they work, but then the main pages 404.
Thanks in advance
2
Answers
Have you tried this?
To achieve this, you can indeed use the functions.php file to rewrite URLs.
Start by adding custom rewrite rules and flushing the rewrite rules using the ‘flush_rewrite_rules()’ function. Additionally, ensure that your custom rewrite rules don’t conflict with existing ones.
Keep in mind that troubleshooting permalink issues can sometimes lead to temporary 404 errors, but your determination to find a solution is key.