Skip Navigation

[Resolved] Set order in view loop

This support ticket is created 2 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+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 2 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#2298669

Tell us what you are trying to do?
Hello I would set the order in view loop, for example I have a custom field called datevisit and want to show the search result in the view loop ordered by datevisit asc

Thanks,
Gianni

#2298999

Nigel
Supporter

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

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

Screenshot 2022-02-21 at 15.18.30.png
Screenshot 2022-02-21 at 15.17.01.png

Are you using the legacy editor for Views or the View block?

In either case an orderby option is available, where you can choose to order by a custom field.

(Note that on large sites ordering posts by a custom field value may affect performance—a known WordPress limitation.)

#2301133

Hello,
thanks for reply! I'm on view block. This is fine now.
I have another view (always view block editor) and I want to execute the classic group by post_title query in the view loop. In this way even if I have multiple items with the same title, I want to show it only once.
Please advice.
Thanks,
Gianni

New threads created by Nigel and linked to this one are listed below:

https://toolset.com/forums/topic/split-add-group-by-to-view-query/

#2301145

Nigel
Supporter

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

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

I'm glad you have that working.

We handle one issue per ticket in the support forum, so I've split your other question into a different ticket.

Let's close here and handle the other issue separately.

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