Skip Navigation

[Resolved] Possible to do secondary sorting based on custom taxonomy has values

This support ticket is created 6 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.

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)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 6 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1109315
tt.jpg

I am using a view to list football games on tv and streaming. I have them sorting ascending by a custom date time field which works fine. I have a tv channel custom taxonomy and a streaming services custom taxonomy.

Ideally I would like to prioritize the order so matches with the same start time which has a tv channel set in the custom tv channel taxonomy will be shown before matches that only are on a streaming service.

I have attached a picture (danish website but I think you get the idea). So in that example 3 matches have tv channel logos but as you can see the second line entry without TV channel is shown in between.

So I was wondering if there is any way with custom code to do a secondary sorting that prioritize posts which has custom taxonomy value (TV channel)? I could only find a custom code example here on the forum which deals with secondary sorting by custom fields.

#1109405

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - there is no native way to sort your post by taxonomy term as post query and taxonomy query both are different.

This needs pure custom programming which is beyond the scope of our support policy. If you need custom programming for your project, pleases feel free to contact our certified partners:
=> https://toolset.com/contractors/

However, here is a link that may help you to build solution as per your requirement.
hidden link