PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

How to change initial sorting order?

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hello,

I'm using this solution in my sorting panel: https://prnt.sc/w83m66
but I would like to change initial (default) sorting.

When I click"Best rated" button the data-order attribute is set to"ASC", is it possible to change it to"DESC" after first click?

Thanks,
Piotr

Hello Piotr

Please  drop me  exact  link to  the  issue

Hello,

Sure, I've added url into private data for this topic..

The point is that now we have to click"Best rated" button twice to order lessons from the best rated to the worst, we would like to click only once.. hope you understand.. Thanks

Hello

Try  in  file - \plugins\meta-data-filter\views\sort_panel\button_filter_panel.php - change  this  code - https://c2n.me/4alVEac.png

<?php echo($order == 'DESC' ? 'ASC' : 'DESC') ?>

Hi,

Thanks, I've changed this code - unfortunately it's still the same.. i have to click twice to order from the best rated..

Hello

Please cleare all cache and  do  a test

Thanks,

Cache cleared, unfortunately still no change (i've tried also incognito mode in Chrome)

what version of the plugin are you using?

 

It's version 1.2.7.2 (Free)

Hello

Ok!  Try  this  code <?php echo( ($order == 'DESC' && $value[0] == $order_by) ? 'ASC' : 'DESC') ?>  and  drop me  screenshots of  your  code

Hello,

This code fixed the issue.
Thanks a lot, problem solved.

Hello

Great! Welcome;)