Skip Navigation

[Resolved] Filter by ASC and DESC in the same bloc

This support ticket is created 5 years, 9 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
- 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 2 replies, has 2 voices.

Last updated by Pat 5 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1224857

Pat

Hello,

I'm using a filter inside a Views and currently have defined 2 ways of filtering : by title and by post date.
I have also added the sort order ASC andDESC as this :

<div class="form-group"><label>Triez par :</label></br>
<div style="width:100%;">[wpv-sort-orderby type="select" options="post_title,post_date" label_for_post_title="Nom" label_for_post_date="Nouveautés" orderby_ascending_for="post_title"  orderby_descending_for="post_date"]</div>
</div>
<div style="width:100%;">[wpv-sort-order type="select" options="asc,desc" label_for_asc="Croissant" label_for_desc="Décroissant"]</div>

The issue is that I have 2 blocs (1 for the sort option ans another for the sort order)
Now, I would prefer to have only one bloc with the following options :
Title ASC
Title DESC
Date DESC
Is it possible to get this and how?
Regards
Pat

#1225058

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - As you can see with our Doc thats the official way views supported to add sorting controls:
=> https://toolset.com/documentation/user-guides/allowing-visitors-to-sort-the-front-end-results/

You may have already noticed that we use two shortcodes:
- [wpv-sort-orderby] - where you add the fields to order by
- [wpv-sort-order] - will take care of ordering options ASC or DESC

I do not have any other way or workaround to offer you at the moment.

#1225312

Pat

Understood.

Thanks Minesh
Regards
Pat