I do not come across the following problem:
I have a costom post type: companies.
For this post type there are post fields, for example: Google maps, phone, www. and the: ADDRES field.
But some companies have more than one ADDRESS.
So i made a one-to-many relatonship which the same post addres fields.
Now it's coming:
I have a search view that filters on two things: taxonomy: industry and a costom post type: province
The view shows the results on a map. When I go to the page with the view, i see all results (id = "$ companies) displayd correct.
Only when I start filtering by branch on taxonomy the one-to-many childs ADDRES wil no longer be displayed on the map. But i need these locations also on the map.
It seems that only custom field province (filter) works.
So the taxonomy filter : industry don't shows in full on the map. Only one location, but not the one-to-many extra location(s) of the (custom post) company.
Dear arnoldd,
I assume we are talking about this case:
Grand-parent post type: province
-- Parent post type: companies, with taxonomy "industry"
----- Child post type: ADDRESS, with custom fields "Google maps, phone, www"
I suggest you setup a nested view:
1) Parent view query only one post type "companies":
a) filter by taxonomy "industry" and parent post "province"
b) display "companies" post information + below child view
2) Child view query ADDRESS posts, filter by parent post setup by parent view, filter by:
Post relationship filter
Select posts that are a children of the current post in the loop.
and display the google map markers
More help:
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
Dear Luo,
It seems to work.
Only i get the error on the bottom of the map: no items found.
So i removed from te nested view:
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
Is thiscorrect?
Yes, if you see the message:
No items found
That means there isn't any child "ADDRESS" belongs to current "companies" post
If you remove those codes from child view, then it will not display that message.