I have a Custom Post Type named ‘Real estate’ which has (amongst others) two different taxonomies:
- ‘Purpose’ (hierarchical; terms used are ‘Living’, ‘Working’ and ‘Holidays’) and
- ‘Location’ (non-hierarchical; e.g. ‘London’, ‘Berlin’, ‘Paris’).
For a search form on the ‘Living’ taxonomy archive I would need a list of all ‘Location’ terms associated with posts in the ‘Living’ taxnonomy term archive in order to give it back in the search form through a select.
How can I, best as a list of comma separated values for an array, get all the terms for ‘Location’ used in the ‘Living’ term archive?