Skip Navigation

[Resolved] View Taxonomies of a Related Post?

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 0 replies, has 1 voice.

Last updated by Djuna 2 months, 1 week ago.

Author
Posts
#2805621

I have a CPT named "Projects" that describes various film and television projects we've worked on through the years across Indonesia.

My database includes the following location fields for each project, with sample data for a single project below.

Each location A (e.g.,A1 = Jakarta and A2 = Banten) is found on Island A (Java). Each location B is found on Island B, etc.

PROJECT Location Fields
Island_A Java
location_A1 **Jakarta**
location_A2 Banten
location_A3
location_A4
location_A5
Island_B Bali
location_B1 Ubud
location_B2 Uluwatu
location_B3
location_B4
Island_C Sumba
location_C1 Wanukaka
location_C2
Island D
location_D1
location_D2
Island_E
location_E1
location_E2

I also have a CPT named "Locations", which relates to "Projects" via the field "Location Name". See below sample data for Jakarta, which links to the Project above.

LOCATION Fields
Location Name : **Jakarta**
Coordinates: -6.1944491, 106.8229198
Description:
Gallery:

The Location CPT also includes a simple heirachical taxonomy. Here's the sample taxonomy for Jakarta:

LOCATION Taxonomy:
Island: Java
Region: Jabodetabek

I hope that my Project content template can include the following:

1) A map with a marker for each discrete location coordinate for the given project.
Question: Possible?

2) A View that displays each location name along with the region and island name derived from the related Location Post.
Question: Possible? I don't see if/how I can access the taxonomy of a related post.

Thank you!

#2805727

I've implemented a work-around by using a bit of redundancy. Both Projects and Locations now independently use the Location taxonomy (regions and islands). I'll need to maintain these separately, of course, but for this site that's not too much hassle.

Meanwhile, location names are common fields between Projects and Locations, with Locations holding a field for coordinates. Happily, I found my map on Projects was able to display multiple markers with coordinates pulled dynamically from related Location posts.