Currently I have a Custom Post Type called "Vehicle". For each generated post I get a subpage which gets a prefix via functions.php.
So if I create the post "A5" I get (after the system inserted the prefix "Audi-") the following URL: domain.com/vehicle/audi-a5/
In addition, I have created a custom taxonomy called "location" which allows me to display countries, regions and cities using subcategories. My post in the custom post type "Vehicle" is assigned to a corresponding area.
But now I have a case where I need all posts of a custom post type not in the category "Vehicle" but attached to the taxonomy to which the post was assigned.
So the A5 Post should not be so
domain.com/vehicle/audi-a5/
but in such a way that the
domain.com/location/region1/audi-a5/
or
domain.com/location/region1/city1/audi-a5/
Hello. Thank you for contacting the Toolset support.
Well - this is a pure question where you need to rewrite the permalinks as per your need.
Types support one option to rewrite the post type slug. There is a rewrite option available with CPT:
=> Edit your post type
=> Navigate to "Options" section
=> Under Rewrite option - click on "Use a custom URL format" and you can add your custom slug there.
=> Using this option you can add the static prefix to your URL but not dynamic
To change permalinks to your described structure will need custom programming and that is unfortunately out of the scope of our support policy. If you need custom programming work with your project, please feel free to contact our certified partners:
=> https://toolset.com/consultant/