We have a custom post type called workshops: hidden link
We are using a view in the PHP template to sort the workshops by a custom field called start-date so that the most recent appears at the top.
We have two taxonomies for our custom post: teachers and workshop categories.
We need to create a view that we can embed in our php template that allows us to show all the workshops by teachers or workshop category but ordered by the custom field start-date.
When I create a taxonomy view I can't find a way to order the results by the custom field start-date.
How to I create a taxonomy view that is ordered by our start-date custom field?
I thought about a solution like that, however the issue is that 1 post can be assigned to multiple taxonomies so the display wouldn't be exactly alphabetical.
Lets say Post A is assigned taxonomy A and Taxonomy B and post B is assigned to taxonomy A and C
Now if we were to do a Parent/Child view and sort the parent view by the custom field then the taxonomy view will display this.
POST A
Taxonomy
-A
-B
Post B
Taxonomy
- A
- C
What I think you want to achieve is something like this.
Post A
Taxonomy
- A
- B
Post B
Taxonomy
- C
Now if we were to let the Parent view display only the Child view then you would get this.
- A
- B
- A
- C
Which i'm assuming would not be the desired results.
Just to clarify: we don't want the results to be alphabetical - we want to order them by by our start-date custom field (which is available only in our custom post type and not our taxonomy.
Also the way we use taxonomies on this site only one taxonomy will be applied.
For example we have workshop categories and teachers taxonomies.
In the back-end only one value will be selected for workshop categories and teachers.
So while in theory there can be multiple selections we won't be using this.
With this in mind do you think it will be possible to create a parent/child view so we can sort our taxonomies by the start-date custom field? And if so how would we do this?