[Resolved] View to list posts grouped by parent Post
This support ticket is created 2 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I need to create a view that list posts in groups by a custom field of their parent post type (not necessarily the same exact parent post). First loop will by "state" custom field of parent post type, second loop is alphabetical order of "city" custom field of parent post type. See attached for what I'm trying to achieve and the current setup of post relationships. I will also have a filter by radio buttons above the results that I am able to do, but I can't seem to get parent/child listings to work.
Hello. Thank you for contacting the Toolset support.
The Doc link you shared are the correct ones and I'm not sure why its not working at your end.
Can you please share problem URL and admin access details and let me see whats going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.
Hi Minesh, because I did not want my attempts for this to be on the live site, I decided to move my trials to a Local staging site for testing. Do you want me to to send you the files and database by using (https://toolset.com/faq/provide-supporters-copy-site/)?
Hi Minesh, I am going to work on creating a testing site that you can access and copy my local database to that test site. I figure that You would be able to give better support by have access this way. When you get a chance, Can you resend the request for access again.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.
Then you will have to add custom post type States or taxonomy so that we can filter it based on that.
Based on States as post type way:
Then you will have the relationship as: Location => States => Careers
Later we can query posts using view listing all state names and you will have to connect the specific state to careers.
Based on States as taxonomy way:
If you can add States as taxonomy then we will create a taxonomy view that lists state names as parent view and then we will get all careers belongs to that state. You need to attach the post to specific state (term).
I also need the custom search filter to eventually work so that I can show results by category, like the "Test 1" example.
==>
You can not mix both grouping by states as well as custom search as to display group by states we need nested view (view inside view) and we can not place custom search view within the nested view as it will display search form for every nested entry. You have to go with one choice either list posts group by states (again subject to the adjustment to your structure, either use State as post type or taxonomy and attach career posts to it) or go with custom search that will not offer grouping.
"You can not mix both grouping by states as well as custom search"
==>
I really was hoping that this would be possible. Is there any other possible solutions?
If I have to use only custom search, Can I add in a filter by state dropdown (state field of location - or - "state" taxonomy), so that the user can narrow results by state?