Skip Navigation

[Resolved] View List Display Order

This support ticket is created 5 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1187760
ordering.png
dropdown.png

On my website, I've got a car listing with pagination & a custom search.

The cars are categorized using a custom field called "sale status" select dropdown field.

There are three options in the select field type, for sale, sold & in stock.

When viewing the listing, I need "for sale cars" to show first, then "in stock" & lastly sold ones.

I attached how I have set up my custom field & the view ordering. I did play around with views ordering but none of the options helped.

Please let me know how I can achieve this listing order.

Cheers

#1188005

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

If you are ordering the output of a View by a custom field, it is the field value which is relevant (not the display text of the field).

The simplest solution to achieve the ordering you require is to change the values stored in the database for this field, e.g. to

For sale 	1
In stock	2
Sold		3

You would need to re-save your posts to update the stored values, though.

Also, this will order the posts as required, but it doesn't group them such that you can have headings between each set of results.

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