Hello. Thank you for contacting the Toolset support.
I would like to know first, do you have any post-relationship between any of your post types? If yes, what is the relationship and what are the post types?
The link you shared I could not able to see it, Can you please send me access details.
*** 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 have set the next reply to private which means only you and I have access to it.
Ok - I'm able to load the problem URL you shared with me and I see you have added the custom search with the map as well as you are displaying the results.
Now, as I understand, you want to display the results as:
- program One
-- Lot post 1
-- Lot post 2
-- Lot post 3
- program Two
-- Lot post 4
-- Lot post 5
-- Lot post 6
If the above example is correct - you can not group the posts by the parent as to display the posts group by a parent we need to use the nested view. One view that displays the parent (program ) information and one view to display the child (Lot) information and we need to add the child view inside the parent view's Loop.
With your current Lot view, you have added the custom search and map, if we create parent view and add the Lot view that you created within the parent view's Loop editor the custom search will be repeated with each parent view iteration that is why its not possible to use the nested view and display the lots group by parent.
However, if you just want to display the parent title just beside the lot title, that's possible.
I mean : i need to filter child posts but i want parent post in result.
It is like i have room houses and rooms
I need to search all houses that have 3 rooms.
We can see, i filter on rooms but i display Houses.
I mean : i need to filter child posts but i want parent post in result.
==>
ok but you just want to display the associated parent post title to your related lot view? How exactly you want to display the parent?
We can see, i filter on rooms but i display Houses.
==>
There is no houses. I think I understand what you are saying but its still not clear to me and withount knowing what exactly you want to display at what place Its hard for me to guide you in the right direction.
Can you please share a few screenshots of how exactly you want to display the parent?
I mean : i need to filter child posts but i want parent post in result.
==>
ok but you just want to display the associated parent post title to your related lot view? How exactly you want to display the parent?
-----> Not just the title, i need all filed of the parent post
We can see, i filter on rooms but i display Houses.
==>
There is no houses. I think I understand what you are saying but its still not clear to me and withount knowing what exactly you want to display at what place Its hard for me to guide you in the right direction.
---> I wanted explain. Houses is like program and rooms like lot.
Can you please share a few screenshots of how exactly you want to display the parent?
I have no screen, but i can explain :
I need filter all programs that have child (lot) with parameter selected.
And i want display programs like title, picture and others fields.
I need filter all programs that have child (lot) with parameter selected.
==>
So, as I understand now, you want to display the parent (programs) information only, not the lot information?
I checked that following Lot posts have been assigned the value "Montpellier" with the field "Ville":
=> hidden link
=> hidden link
And the parent Program to both of the above post has been assigned as "Le Gabriel"
=> hidden link
Now, with your frontend custom search view, with the following link:
=> hidden link
- Do you want to display all the fields belongs to the parent post "Le Gabriel"?
If yes:
- Do you want to display the custom fields belong to a lot (child) as well or only program fields?
- Do you want to display only the parent post (Program ) field and the parent post should be displayed only once? because the view you created is set to query the Lot post type and it will return for the example the following two posts which are assigned with the same parent.
=> hidden link
=> hidden link
I see with your view you are already displaying the parent information:
Now, with your frontend custom search view, with the following link:
=> hidden link
- Do you want to display all the fields belongs to the parent post "Le Gabriel"?
-->YES
If yes:
- Do you want to display the custom fields belong to a lot (child) as well or only program fields?
--> Parent filed
- Do you want to display only the parent post (Program ) field and the parent post should be displayed only once?
--> Yes
because the view you created is set to query the Lot post type and it will return for the example the following two posts which are assigned with the same parent.
=> hidden link
=> hidden link
--> Yes, i know it is that my problem 🙁
I see with your view you are already displaying the parent information:
1
[types field='nom-du-programme' item='@programme-lot.parent'][/types]
Is your concern is that the name of the program should not be repeated?
--> No my problem, as you have understood, is i need to group by program
YOu are really the best, but i think i have some problem right now 🙁
First, there is some errors that i didn't have before, i try to instal latest extension, but errors still be there.
I try to desactivate your code, the error is still there but it is strange because, me, i didn't change anything, do you have idea ?
Second, my jquery doesn't work anymore on the page. Maybe same problem ?
And i think there is a problem because when i add a city in filter "Montpellier" there are 4 results, and without city, there are 3 results, how it is possible 🙁
First, there is some errors that i didn't have before, i try to instal latest extension, but errors still be there.
I try to desactivate your code, the error is still there but it is strange because, me, i didn't change anything, do you have idea ?
==>
The errors should be gone now, it was displaying because I've activated the debug mode which I disabled now.
Second, my jquery doesn't work anymore on the page. Maybe same problem ?
And i think there is a problem because when i add a city in filter "Montpellier" there are 4 results, and without city, there are 3 results, how it is possible
==>
Can you please tell me what ou mean by " i add a city in filter "Montpellier" there are 4 results, and without city, there are 3 results"
I see you have thousands of lots and program entries added.
If you notice - with the following link - the parent IDs are 23998, 34829 and 23934 - I checked all these IDs are program (parent) IDs.
=> hidden link
Then, I checked by filtering the view with "Montpellier" and I see the program (parent) IDs 32737, 33179, 32735 and 33379. Again, I checked all these IDs are program (parent) IDs.
=> hidden link
So, I checked again and the code I added works as expected to return the unique parents.