Skip Navigation

[Resuelto] Order view by custom field that is numeric?

This support ticket is created hace 10 años. 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
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 4 respuestas, has 2 mensajes.

Last updated by Stanislav hace 10 años.

Assisted by: Adriano.

Autor
Mensajes
#171400

I have a custom field that contains numeric data, like:
8, 7, 77, 88

However, if I order by this field custom field DESC, the results are unexpected.

Expected results:
88
77
8
7

Actual result:
88
8
77
7

I think it is ordering them fields in a textual way, but I need to do in a NUMERIC fashion. Suggestions?

#171412

Dear Stanislav,

In this case you will need to use a NUMERIC custom field, when you are creating your custom field this type needs to be this one. Single lines and others shouldn't work.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

#171430

Adriano,

The field is not registered in Types. Can I register it and set its type as numeric?

#171441

Unfortunately not, to handle that you will need to create a new custom field on Types and choose Numeric type.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

#171452

Ok thanks. 🙁

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