Skip Navigation

[Resolved] Continued: "Messed up a structure" further questions CPT relationships

This support ticket is created 6 years, 8 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#559339

Thank you so much (Christian Cox), you saved me!

RELATES TO: https://toolset.com/forums/topic/messed-up-a-struture-relationships-useless-no-access-to-data-can-i-save-it/

It took some time to get back to you, I was testing it all out.

I am facing some issues using this method, when I need to sort the information.

The Documents have categories and I need to display them sorted in categories, but I can't figure out how. I promise I've tried, a lot. But I don't think I really understand this.

Also, - one type of document is invoices, they will be displayed in their "invoice" category, but these I also need to sort by which month they have been posted.

Can you help me with ideas?

Thanks for your time,
Best regards
Lykke

#559458

Dear Lykke,
Views is using wordpress class WP_Query to query posts, see document:
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

There isn't any option to sort the result by taxonomy.

In your case you can try with a nested view:
1) Parent view list terms of taxonomy "categories"
2) Child view list "document" posts which are assigned with term from parent view, see our document:
Views Inside Views – Display Nested Multidimensional Lists
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.