Skip Navigation

[Resolved] How to sort post items by newest to oldest

This support ticket is created 3 years, 6 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#2129987
Screen Shot 2021-07-30 at 10.42.50 AM.png

Tell us what you are trying to do?
I have an api setup that pulls group information to our website and I am using toolset to display this information that is being pulled. I have created a view for this groups page and currently it is displaying groups in alphabetical order. I would like them to display from newest added group to oldest added group.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
No

What is the link to your site?
hidden link

This is my view:
[wpv-filter-start hide="false"]

[wpv-filter-controls]

<div class="form-groups">

<div class="form-group">
<label>[wpml-string context="wpv-views"]Search[/wpml-string]</label>
[wpv-filter-search-box placeholder="search group name" output="bootstrap"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]Campuses[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="event-campus" type="select" format="%%NAME%% (%%COUNT%%)" url_param="wpv-event-campus"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]Days[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="groups_day" type="select" format="%%NAME%% (%%COUNT%%)" url_param="wpv-groups_day"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]Times[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="groups_time" type="select" format="%%NAME%% (%%COUNT%%)" url_param="wpv-groups_time"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]Types[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="groups_type" type="select" format="%%NAME%% (%%COUNT%%)" url_param="wpv-groups_type"]
</div>

<div class="form-group">
<label>[wpml-string context="wpv-views"]Child Care[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="groups_childcare" type="select" format="%%NAME%% (%%COUNT%%)" url_param="wpv-groups_childcare"]
</div>

<div class="form-group">
<label>  </label>
[wpv-filter-submit name="Enter" output="bootstrap"]
[/wpv-filter-controls]
</div>
</div>
[wpv-filter-end]

#2130343

Hello and thank you for contacting Toolset support.

You can add sorting to the view. If it is not visible on the view, activate it on the screen options. Check this screenshot hidden link
And choose "Post date" in the ordering option. Check this screenshot hidden link

If, on the other hand, you want to have sorting control in the view's search filters, you can add them with the sorting control button, and choose the post date for sorting. hidden link

I hope this helps. Let me know if you have any questions.