Skip Navigation

[Resolved] Map in PAGE with Map Markers (CPT), children of POSTS filtered by taxonomy

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Noman 7 years, 3 months ago.

Assisted by: Noman.

Author
Posts
#563499

Summary: Display Map on a WordPress PAGE (post-type Page) with Map Markers (a CPT) that are children of POSTS (WordPress post-type POST) where a particular taxonomy is selected in the POST.
How do I do this?
I have a custom post type called map markers. It represents locations of items represented in posts (restaurants, for example).
The locations are children of these posts.
In a PAGE (a third post type) I would like to display a map containing markers of posts (restaurants) that are assigned to a particular taxonomy called "featured-posts".
But I do not want to filter by that taxonomy in the map marker post type. That would require constantly editing multiple map markers to assign the taxonomy.
I want to show map markers for parent posts that are associated with a particular value in that taxonomy.

Example:
Let's say there are three restaurants (posts) that have the best pancakes. I can easily mark the value "best-pancakes" in the featured-posts taxonomy in the three posts.
I then in a PAGE (a 3rd post type) that talks about PANCAKES want to show all the map markers for the three restaurants (those map markers are the childrenn of those three restaurants) that have the best-pancakes taxonomy chosen.
What's the best way to do this?
(I could create the article about the Pancakes as a post which would make this very easy, but it functionally works better as a page I think.)

#563562

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Kenneth,

Thank you for contacting Toolset Support.

I could create the article about the Pancakes as a post which would make this very easy, but it functionally works better as a page I think.
==> Please use post(s) for this, since you can freely build and control relationships with posts or CPTs.

Thanks