It seems that you are looking to accomplish is a simple parent/child relationship with *n levels. I ran into something similar when working on subordinate posts https://github.com/codearachnid/wp-subordinate-post. The way I resolved the hierarchy (and even allowed for deep permalinking was to utilize the post_parent field. Based on your statements it seems like there might be several extra associations such as hooking a (maintenance/sales) person to a floor which would cover multiple room etc. However, to answer you main problem is seems that if you tackle the hierarchy that will solve the relationships in the list?
Thus to spit out the ordered array I’d recommend setting up a looping query for children by parent.
Related Posts:
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to check if last uri segment is a custom post type or taxonomy term?
- Custom permalinks – post type – hierarchical taxonomy’s
- How to show term-specific post list, without posts associated with child terms?
- Getting taxonomy terms used by custom post type
- Custom Taxonomies: Multiple Hierarchical Permailnks For A Single Post + Prev/Next Links
- Hierarchical Custom Post Types or Similar
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Custom Posts Hierarchy? (State/City/Restaurant)
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Automatically populate a hierarchical taxonomy from a custom field
- Display custom post type in hierarchical order with get_terms
- Should I use custom taxonomy or custom post type
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Custom while loop for hierarchical display of a taxonomy
- Get the taxonomy of a post hierarchically
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Hierarchial Custom Post Types/Taxonomies
- Hierarchical permalinks for custom post type and taxonomy
- Custom post type Permalinks with hierarchical Taxonomies
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Custom Post type & Taxonomy 404
- custom hierarchical taxonomy and custom post type list contains surplus posts
- Creating a non-hierarchical Taxonomy that behaves like categories
- Migrating Hierarchal Taxonomy Categories Between Post Types
- Ideas on how to organize a project [closed]
- How should I structure complex content hierarchies?
- List child categories from parent category on custom taxonomy page
- Custom taxonomy terms hierarchical navigation
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Display a Custom Post Type within another with hierarchically slug
- Custom Post Hierarchy and users
- Custom Post Type categories at edit post not hierarchical
- How can I add a “fake” parent into the permalink?
- taxonomy term names in custom post type permalink structure
- Custom taxonomy archive not showing posts of certain child taxonomies
- How to develop Knowledge center in WordPress Website
- List all posts in hierarchy and groupped by each taxonomy
- Grouping of CPTs and taxonomies into menu groups in admin
- Best way to organize book-page structure
- using wp_update_post for updating custom post type
- Get url.com/post_type/taxonomy/term work!
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- Invalid argument supplied in register_taxonomy $args->taxonomies
- set permalink for CPT
- Top Level pages in wordpress giving 404, but child pages working fine
- Sitemap generation
- Plugin fatal error
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy/Custom post type structure suggestion on a movie site
- Search by tag name and category
- Taxonomy in URL
- Ordering values entered in Custom Taxonomies
- Listing all term items alphabetically / sorting loop
- How to produce a sub-page-system in WordPress
- Change the Custom Taxonomy URL Slug pattern
- Advanced search form with filters for custom taxonomies
- Custom taxonomy and post type with same slug
- Losing Nav Active State in Menu
- WordPress custom taxonomy template not working
- dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
- Listing custom terms in custom post meta
- Show fields based on taxonomy selection in editor
- Display related custom taxonomy posts in sidebar
- WordPress subpages to custom post types
- Different rewrite rules for taxonomies and cp in multisite?
- Permalinks: custom structure for taxonomy – tags?
- count results in search page based on custom category
- Custom permalink with child taxonomy terms
- Assign Custom post to Custom Taxonomy
- Display Registered Taxonomies
- How can I get this request to use the Custom Post Type page template instead?
- Include custom taxonomy term in search
- Show custom post type inside a custom post type
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Display and register custom categories for custom post types
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Different Category system needed for the Custom Post Type
- Not Able To Render Single-CustomPostType.php File
- Custom Post Type Category Link
- Retrieve custom post types by custom taxonomies with WP_Query
- Custom Post type category pages template and loop
- Archive for a Taxonomy of a Custom Post type
- Three Most Recent Posts, One Per Term
- Check if post has specific tag_ID in custom post type
- How to get WordPress term attached to the Post?
- Query posts with double taxonomy
- Custom Post Archive is not working
- Custom post type pagination 404
- get_the_title() is returning results from previous loop
- Why cant I add a custom post type to a custom taxonomy?
- Show Custom Taxonomy title in loop
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Trick to get custom post types to show up on a custom taxonomy page?
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- How to add custom taxonomy in custom post type permalink?