I'm following your guide (How to set up post relationships using Toolset) to do exactly what the same thing as in the example - connecting a custom post type (songs) to another custom post type (albums), and assigning track numbers to the songs on the albums.
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/
I am able to create the CPTs, many-to-many relationships and the view, but I'm unable to sort the songs by the track number, which is a custom field within the intermediary post type.
I searched through the documentation, and found that one option could be to filter the query after it gets listed. How can I do that with Views? I've already tried adding another query filter, but I can't find any option that would allow ascending or descending sorting based on the track numbers.
If I select "Ordering" by the custom field of the intermediary post type, it shows the dropdown menu to select ascending/descending, but the third field, which says "As a number" is grayed out. So I wonder if my data is in correct format, or does it auto-detect the type of the field?
If I add another query filter after the "Select posts in the Songs on Albums relationship, that are related to the Post where this View is shown.", I can't find any options that would allow me to further sort the query based on the custom field of the intermediary CPT.
Is there another way to use the custom order, which is defined by the custom field (track number) in the many-to-many relationship intermediary post type? The type of the custom field is "number", which sounds like the perfect data type to define the order, but should I use something else?
Is there a better way to do this?
Link to a page where I display the view:
hidden link
On this page, the songs are in the right order just because the post-ID's are in the correct order - but I can't rely on that being the case with every song, and the songs have different tack numbers on collections, so I need this list to actually be sorted by the intermediary post type's custom field.
I expected to see:
Option to order by meta key, maybe? Something that lets me sort the view by the track number.
Instead, I got:
A few ways that sound like they're going to do what I want, but the selections I chose didn't show any results (no posts were found).