Any chance I might accomplish this same thing by nesting views? The title is from the parent post and I would like to group the curricula (children) under one heading for the district anyway.
This might be possible, however is the year field on the child post ? We can sort the parent view by the post title and that will work, however if the child view doesn't have the year custom field then we won't be able to sort it by the year.
If it does have the year field on the child post then you can definitely achieve this with a nested view listing.
Yes, the year is on the child and so are the grades (which is what the client now wants for secondary sorting).
The other factor is that I'm using a search and maps. I was only able to get the map working with the search on the parent (because it has the address associated). Are these the correct steps to set this up with nested views?
Search and results on the parent post (with address) - return posts sorted by post tile alpha ASC. Then nest a view of all child posts filtered by post-relationship (current post in loop) and sorted by grade-level ASC in the loop of the parent search? Does the child posts view go in the loop wizard area or the loop item area?
Given that you only want to search by the Parent field parameters then yes this is the correct step.
Does the child posts view go in the loop wizard area or the loop item area?
If there is a content template on the view then you can add it to the content template for that view. If there isn't then you will add it to the loop area inside the wpv-loop tags.
I created the two views but there are 2 issues: the parent name in the main view is repeating instead of only listing the district 1 time and the children are listed under every parent rather than just the ones they belong to. hidden link. I'd like e.g. 21st Century to only be listed 1 time with only it's children showing under it.
Would you mind allowing me to have access to the site to check the view for you?
Secondly with the repeated titles for 21st Century I see that they are 3 different posts with 21st Century in its name so each will show as a different entity.
I've enabled the private fields for your next response.
Please do note edit any of the other views.
Sorry - I was still working on the view when you looked at it -- 21st Century used in the title of the "district" children> "curriculum" posts just to keep track of them. What I would like is for the parent district, e.g., 21st Century Prep School to only show one time as a link with all (3) of it's children (curricula) listed underneath in the search results. You can see the children that should show on this district detail page: hidden link
I don't see a change to the results. Districts are still listing multiple times with all children shown every instance of the district. If I change the main view to display districts then I can't filter on district post titles and all the other filters on the curriculum also break.
The problem is that you are using 2 child views. I'm under the impression that you want to filter your view by the Parent Post Title which would be the District.
However your Parent and Child view are both listing out Curriculum, the only difference is that your Parent view now is retrieving the Parent's post title through the child, This means you are adding the following shortcode.
[wpv-post-title item='@parent.district']
Your current filters are then currently incorrect since its not filtering the Parent information.
If I switch to making the search and results on the district there doesn't seem to be any way to have filter on the post title (district post title) - am I missing something?
We have to solve the issues in order. Currently i've created a small test view to see if the Post relationship filter works and from the link below you can see that it is now filtering for the correct posts. hidden link
The next step i'm assuming is that you want the child post view to be sorted by the year field, this i've done.
I also see where one of your posts in the Relationship with "Abbotsford" doesn't have the year filled out. This will cause the post not to show up.
What you can do is to go ahead and use my test view to continue building out your system while checking each modification that you made so that you can know when an issue comes up.