Skip Navigation

[Resolved] Sorting of rfg entries.

This support ticket is created 4 years, 1 month 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)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 4 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2229669

Hello support,

I want to sort by a repeatable date field. The field is setup as a date-field in toolset. I want to order the rows by newest date first.

I have managed to sort by toolset-post-sortorder but I want to sort by the date field avtaler-revisjonsdato.

Can you please help?

This is the query as of today sorting by toolset-post-sortorder.

$child_posts = toolset_get_related_posts( get_the_ID(), 'nedlastbare-filer', array( 'query_by_role' => 'parent', 'args' => array('meta_key' => 'toolset-post-sortorder',
'meta_compare' => 'EXISTS'), 'orderby' => 'meta_value_num', 'order' => 'ASC', 'return' => 'post_object',) );

#2229721

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Lets assume you created a custom date field using Toolset Types plugin namely "mydate" then you can add the meta key as:

'meta_key' => 'wpcf-mydate',

Can you please try to replace the above meta key within your code with your original custom field value and check if that help you to resolve your issue.