This support ticket is created vor 6 Jahren, 2 Monaten. 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.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
We have a custom post type called workshops: versteckter 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?