Skip Navigation

[Resolved] how to sort custom child posts by post_date

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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)

Tagged: 

This topic contains 1 reply, has 1 voice.

Last updated by coderD 7 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#517897

I have a 'Sliders' CPT which is a children of 'Pages' and 'Articles'. I am trying to sort the sliders based on post_date.

I expected to see the slider posts get sorted by descending order when I use this code.
$sliders = types_child_posts("slider", array('orderby' => 'post_date', 'order' => 'desc'));

Instead, I got the slider posts always sorted in ascending order.

#517900

It worked after the conflicting codes are removed.

The forum ‘Types Community Support’ is closed to new topics and replies.