Skip Navigation

[Resolved] Show markers of from different CPT on a single map

This support ticket is created 6 years, 6 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 6 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#900061

I have a WP CPT with two child CPT. On the parent detail pge I would like to show a map displaying markers relative to the two child CPT. Is it possible? How?

#900338

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please tell me have you establish post relationship between your post types using Types plugin?

If yes - could you please tell me the post type names and your address field name.

Basically, you should build a view to display map and filter the child post type entries with your parent post Id but I would be able to guide you in right direction once I able to check your setup.

Could you please tell me to which parent post you want to display the map.

#900383

The main post type is called 'Wine Region' (wine-region); It has a child post tipe 'Winery' (winery); and a second child post type named 'Wine Experience' (wine-experience). The Wine Experience post type (for my simplicity) is also child of Winery. I would like to display a map inside a Wine Region content template, displaying markers with wineries and wine experiences.

#900385

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - so as I understand you have three levels - correct?
- 'Wine Region'
--- Winery
----- Wine Experience

It seems you need to use two nested views where you should query your child post type and filter by the parent that is the current displayed Wine Region post.

Is it possible for you to send me access and problem URL? If yes:

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#900669

Actually, to avoid nested queries, I purportedly made the CPT Wine Experiences a child also of Wine Region. Isn't it simpler? I do not need to list items which are grandchildren of wine region. Just two different children.

#900911

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok so you have two child post types which is assigned to single parent.

Then I think you need only one view filter by post relationship and display all the associated child of the currently displaying post.

Please check how you can filter your view to display child posts.
=> https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/#displaying-child-posts-using-views