Custom taxonomy terms as children of multiple custom post types

I'm about to start a part of my project that I've been putting off for too long. I'm not looking for code, I'm looking for confirmation that I'm on the right track and any advice Stackexchange may have to give on this subject.

The setup:

I have two different custom post types with two taxonomies, the first custom taxonomy, industries contains three terms for businesses to select, and the first custom post will be business-profiles. The second taxonomy departments will be used to, you guessed it, categorize employees by department and the second custom post type will be employee-profiles.

I will be using ACF to set up a post relationship field to assign the employees to an employer, and I'll be using rewrites rules to modify the URL's for the departments and employee profiles.

The Goal: To have the department taxonomy terms as a child of each company, i.e.:

Example.com/industry1/business-profile1/department1/employee-profile1

and

Example.com/industry2/business-profile1/department1/employee-profile2

Further information:

I know I can do the rewrite for the business profile easily enough, I've done it four other times on the same project, and I've done a rewrite using the ACF relational field for another post type.

The Question

Is using a regular expression such as example.com/([^/]+)/([^/]+)/%departments% the best method to set a taxonomy term as the child of all posts of a custom post type?

Topic regex url-rewriting custom-taxonomy custom-field custom-post-types Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.