Skip Navigation

[Resolved] Ordering Options

This thread is resolved. Here is a description of the problem and solution.

Problem:
The issue here is that the customer wanted to sort his products by a custom field.

Solution:
You can use the single line field and add it to your post.

Then you can just order your view based on that single line field in either ascending or descending order. Sort it as a number.

This support ticket is created 7 years 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by AlexanderN4266 7 years ago.

Assisted by: Shane.

Author
Posts
#600549

Hi, I need to get products being listed in the order I find proper.
For that, I created a new (WYSIWIG) field that I use just as a number with dashes. I want to use this number to command Toolset what product to show first, what the second and so forth. I want to have full control of how the products are being listed and, truly, do not know how to make it in the context of Toolset.
Currently, I selected this field as the ordering option in the Views, set it to Ascending as a number.
In fact, I am not well aware of the difference between the use of string, field or number and the way PHP processes them.
Could you please help me out.

#600650

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alexander,

Thank you for contacting our support forum.

What I recommend that you do to have some form of controlled ordering is to use a single line field. The numbers your are entering are they like a serial number ? Is it necessary to have the "-" in the numbers?

Also depending on the data type you will need to select a string or number.

Please let me know.
Thanks,
Shane

#600655

Thanks,
No, hyphenation is not the crucial thing to have. So if I just use integers with no hyphens or dashes in a single line field with either the string option or number option, will either option do?

#600663

Yes, the whole idea is to use numbers as a kind of serial number to make Toolset list items the way I would prefer.

#600665

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alexander,

You can use the single line field and add it to your post.

Then you can just order your view based on that single line field in either ascending or descending order. Sort it as a number.

Please let me know if this helps.
Thanks,
Shane

#600675

Yes, it works. Thanks.