Hi,
I have a loop of Child Posts, because the child post is an intermediate type used to connect 2 Parent CPT in a many to many relationship, the Child post itself doesn't contain any fields, and their names are generated randomly.
I would like to sort these child posts by one of their parent's field.
Actually you wouldn't be able to sort the child posts by a parent field since the posts needs to be sorted by their own attributes.
What you can do is if the child view is in a parent view then you can sort the Parent view and the child view will display in the order in which the parents are being sorted.
Thanks Shane,
The child is in a parent view, however the field I'm interested is from the other Parent.
ie, If I have an Art Show, and the Exhibit is my child CPT, I want to display all the Artworks (the other parent) by their alphabetical Title.
So I'm in the Artshow view, but I need to sort by Artwork.
Hope that's possible? As this would be quite essential for a fully working many to many relationship.
I'm a bit surprised with the lack of this. Do you have any suggestions for an alternative set up? I mean I can go through each of the intermediate type and rename them but that's a lot of work (hundreds of them) and defeats the purpose....
Surely it's quite common to need to list such as:
List the Artwork by a given artist that's being exhibited at this Art show
or
List the Songs that will be sung by an Artist at this Event