Without spending too long thinking about this one I would imagine you could do it with one query.
$store_array = array();
while (have_posts()) : the_post();
$store_type = // get term id, slug, name from store type taxonomy
$store_floor = // get term id, slug, name from floor taxonomy
$store_array[$store_type][$store_floor] = $post->ID;
endwhile;
// run a foreach on your $store_array
From there you could sequentially list your store types and sub-group by floors within it. Post ID will give you option to get_the_title()
and get_permalink()
.
If you needed more detail you could add another dimension to the array.
Related Posts:
- Display all posts in a custom post type, grouped by a custom taxonomy
- Exclude a category from WP_Query
- $wp_query->queried_object->ID throws warning: Undefined property
- Select All in Parent Category, Group by Child Category?
- get_query_var() not working in pre_get_posts
- query multiple taxonomies
- Custom Taxonomy with Custom Post Type Finds No Posts
- The Operator “NOT IN” Does Not Work In tax_query
- Counting Posts of a Given Post Type Having a Specific Taxonomy?
- Custom query – alternate posts by category
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- How to get_queried_object on multiple objects?
- how to group custom post type posts by custom taxonomy terms
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- How to get the parent’s taxonomy?
- Querying Posts by Taxonomy From Alternate Network Site
- Sort the main query in subcategories/terms?
- Help with hierarchical custom taxonomies and permalinks…almost there
- Custom Taxonomy List links being re-written
- custom post type paging not working past page 3
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Want to filter only parent post in admin area
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Custom Taxonomy and tax_query Issue?
- Query for posts in 2 taxonomies
- Exclude current post when getting related post on custom post type and taxonomy
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Ordering Custom Post Types with WP_Query
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- Related “custom post type” using “custom taxonomy”
- What is the most efficient way to execute recursive complex queries?
- Sorting the Loop by Taxonomy Value
- custom taxonomy pagination 404 error
- Ordering by meta value not working
- set object terms after some some time of published post – functions.php
- Sort custom posts by date and then by taxonomy
- have to do a while have post to show for two custom post types sharing the same taxonomy?
- custom post type and a “sticky” position taxonomy
- Display post count for a specific month
- display post count in archive page that have relation with another taxonomy term
- How to search through all child taxonomies using WP_Query?
- WP_Query to display number of custom post type filtered (order by) taxonomy
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Live search by custom tag
- Query a custom taxonomy in a function to create an csv file
- WP_Query based on ‘s’ and tax_queries
- WP_query sort by taxonomy
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Ajax load more inside custom post type taxonomy
- WP Query tax_query not returning posts
- Create a custom wp_query from a specific custom post type with specific taxonomy
- The most recent post of custom taxonomy
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Problems with the WP_Query query for a Custom post type
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Display all Custom taxonomy terms and their relevant custom posts
- Get posts of an specific term of a custom taxonomy
- Query pulling all taxonomies, not one I am specifying
- Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
- CPT Efficient way to display posts from different categories with custom query
- Get archive of posts separated by taxonomies and subtaxonomies
- Query Pulling the same post twice
- Custom post type and custom taxonomies display
- WP_Query for CPT with filter by another WP_Query
- Get posts associated with custom taxonomy alternate way
- How to pass taxonomy terms to WP_Query along with $args?
- WordPress custom post type
- Loop with Custom Post Type and Taxonomies
- Custom Taxonomy Query by Taxonomny not working
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- tax_query showing no results
- Post data in separate divs with incrementing class using WP_Query
- Values inside a custom field to determine which category posts to display
- How to display elements of different post types?
- Storing/querying custom date data
- WP Query Post Type with same Taxonomy name
- WP Query WordPress Post Type with the same Taxonomy name
- How to list groupings and keep pagination
- How to retrieve taxonomy terms of the current custom post?
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Catergory args causing loop not to show
- How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query
- display custom post type from register taxonomy
- Attaching multiple custom taxonomies to one CPT?
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- WP Query Conditionally query meta and taxonomy
- Sort ACF by custom taxonomy
- Complex Custom Loop with Includes
- Query custom post type and group by taxonomy
- WP Query – Can’t get posts with specific taxonomy
- Dynamically count the number of custom post types associated to a custom taxonomy
- WP_Query not using relation key as expected and not producing any results
- WP Query filtering by custom category not showing all relevant posts
- How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item
- Custom fields disappearing when a custom post type is assigned
- wp_insert_term how to insert “” in description