I’m trying to sort a custom post type, using 2 taxonomies: Location and Unit - both are setup as categories.
Inside of my location taxonomy page (ie. taxonomy-location.php), I want to list all of the units that are listed at that location. Something like this:
<h1>Unit Title 01 (pulled from unit taxonomy)</h1>
/* START FIRST LOOP ITEM */
IMAGE
Name
Title
Phone Number
/* END FIRST LOOP ITEM */
/* START SECOND LOOP ITEM */
IMAGE
Name
Title
Phone Number
/* END SECOND LOOP ITEM */
<h1>Unit Title 02 (pulled from unit taxonomy)</h1>
/* START FIRST LOOP ITEM */
IMAGE
Name
Title
Phone Number
/* END FIRST LOOP ITEM */
/* START SECOND LOOP ITEM */
IMAGE
Name
Title
Phone Number
/* END SECOND LOOP ITEM */
The only units that should display, are the ones with items in them (since not all locations include all units).
Does anyone have advice on how I could create this?
Read more here: Sorting Custom Post Types, Taxonomy