I would suggest you create a common hierarchical taxonomy that you register with each of your custom post types.
The terms of this taxonomy would match your custom post types (for example use the custom post type slug as the term slug).
You can then structure your taxonomy to match your designed hierarchy, and every time you need to find the parent/child you refer back to the taxonomy.
You could have a parent_post and a child_post meta fields to store the post IDs of the respective parent and child post.
Related Posts:
- Add category base to url in custom post type/taxonomy
- Custom Post Type Permalink / Rewrite not working immediately
- Custom Taxonomy as Dropdown in admin
- Ordering posts by custom taxonomy in admin area
- Custom Taxonomy with Custom Post Type Finds No Posts
- register_taxonomy with multiple object type and update_count_callback
- Create permalink structure for one taxonomy archive per custom post type
- WordPress category, category post and single post
- Copy one CPT to another one in WordPress
- What’s the purpose of ‘taxonomies’ parameter in register_post_type()?
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- Dynamically Create Terms in Taxonomy when Custom Post Type is Published. Almost There!
- Define permalinks for custom post type by taxonomy in WP 3.4
- Disable single pages and archives and keep preview
- pre get posts changing the query
- Custom Taxonomy not showing as option on custom post page
- Querying CPT with Two Taxonomies
- Get Custom Field Values by Another Custom Field in WordPress
- Wp Rest API request posts from a custom taxonomy
- how to get archive urls with same origin for custom types and terms?
- Custom Query to display posts with custom field
- Get taxonomy description based on variable
- Displaying Metabox value (custom post type taxonomy)
- multiple url slug for single custom post type
- Pretty URLs for Custom Post Type & Custom Taxonomy with Duplicate Slugs on WPML
- How is this CPT code in functions.php adding a hidden “products” category?
- Displaying Multiple Post types in Taxonomy
- Filter by custom taxonomy slug on a custom post type
- Create 3 Level Relations with ACF and WordPress
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Archive page for taxonomy terms
- Display Recently Added Custom Post Types with Custom Taxonomy Shortcode
- How do I display tags for a custom post type single page?
- Add custom taxonomy to post content body?
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- Dynamic dropdown select values depending on other custom field value
- Query Custom Post Type Taxonomy term with multiple parameters
- Post format alternative?
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- Custom post type and taxonomy permalinks
- Exclude custom taxonomy term posts from custom post loop
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Not Able To Render Single-CustomPostType.php File
- Using page slug in wp_query
- Custom taxonomy (categories) on custom post type return no results
- previous_post_link in same taxonomy in custom post type
- Remove taxonomies using register_post_type_args
- Different options per post type in WP_Query
- Rewrite custom post type with taxonomy
- Display both parent and child custom taxonomy / content
- how to count the current posts terms
- Get template part with CPT and Custom Taxonomy conditionals
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Is there a way to make child posts inherit parent post terms?
- Custom post types category
- Add custom post type taxonomy tag to article class
- Custom Taxonomy dont save in a frontend form for post a custom post
- Query Custom Post by taxonomy multiple categories
- Advanced archive url structure (category, tag and date)
- Setup page template array in a custom post type
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Custom taxonomy terms as children of multiple custom post types
- Custom Taxonomy and Categories
- custom taxonomy pagination 404 error
- Get the taxonomy value in the post loop inside the archive page
- How to display custom post type taxonomy in Contact Form 7 text field
- Custom Post Type & Taxonomies – Rewrite
- Filter in Custom post type to find the parent post
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Change CPT permalink to use the category
- Listing all custom posts having a specific taxonomy whatever the terms
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Previous/Next custom post links within custom taxonomy
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Custom Taxonomy page redirecting to 404 page
- Pretty permalink structure with multiple (AND OR) taxonomies
- Filter a custom taxonomy from displaying a button all other taxonomies can show
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Problem with type plugin and custom taxonomies
- WordPress Custom taxonomy template
- Custom post type – two taxonomies
- Get link for feed of specific post type AND taxonomy
- Why is this custom post type defaulting to archive.php?
- Get single object term for custom taxonomy
- Sorting custom post types by taxonomy (So close)
- Check if taxonomy is attached to at least one post in a post-type
- Getting (Invalid) when adding custom taxonomy of custom post type link in menu [closed]
- Display custom taxonomy posts of custom post types
- Looping taxonomy in taxonomy?
- Return Custom Post Type Categories
- Custom Post type as Taxonomy
- ACF Relationship: Group posts by parent category term, then child [closed]
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- Custom Post Type urls not working
- Create a hierarchical list of posts that’s grouped and nested by category
- Show a wordpress custom post condtionally using a category term