Skip Navigation

[Resolved] Trying to sort using two different fields in created post type

This support ticket is created 4 years, 4 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by harryT 4 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1398121

It might be a simple thing to fix, but I'm not able to figure out what I'm not doing correctly.
Reference: https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/
Site: hidden link (not yet a production site)

I have created a Post Type called Newsletters.
I have two custom fields in the Newsletters type:
1. Display order sort - Number (required). This is the sort order for the Newsletter editor to indicate the displayed post order (ascending).
2. Quarterly select - Select (required). This is the overall grouping for each Newsletter post. They are grouped by season and year (i.e.: Spring 2019, Summer 2019, etc.). They are to be displayed descending by and have display listed as a header.

I have attempted to create a View within a View that will list the posts as follows:
Winter 2019
* Post Winter #1
* Post Winter #2
Spring 2019
* Post Spring #1
* Post Spring #2
* and so on ...

The results I get either list the Quarterly Select over each post: (hidden link)
Winter 2019
* Post Winter #1
Winter 2019
* Post Winter #2
Spring 2019
* Post Spring #1
Spring 2019
* Post Spring #2

... or all the posts under each Quarterly select: (hidden link)
Winter 2019
* Post Winter #1
* Post Winter #2
* Post Spring #1
* Post Spring #2
Winter 2019
* Post Winter #1
* Post Winter #2
* Post Spring #1
* Post Spring #2
Spring 2019
* Post Winter #1
* Post Winter #2
* Post Spring #1
* Post Spring #2
Spring 2019
* Post Winter #1
* Post Winter #2
* Post Spring #1
* Post Spring #2

#1398241

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The issue here is your structure as you want to group the posts with a specific entity, in your case Quarterly select.

To group such items, the easiest way is you should add custom taxonomy instead of the custom select field "Quarterly select". You should create custom taxonomy and add all the options you added to Quarterly select field as terms. And delete the custom field "Quarterly select" as we are going to use the taxonomy, not the custom field.

Once you create a taxonomy and added the terms assign the term to your posts and then create a taxonomy view and inside the taxonomy view you should add your post view.

The same setup as mentioned with the following Doc:
=> https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/#taxonomy-view-with-a-post-view-for-a-child

#1404869

Still can't figure it out. Not able to sort the two Views correctly, even though I've replaced the Quarterly Select with a custom taxonomy. Login is still live.

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