Support » Plugin: Custom Query Fields » [Plugin: Custom Query Fields] How to sort by ascending order?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have the same question — I see that it defaults to DESC, how do I add ASC?

    custom_query_fields.php

    LINE 39:

    ‘order’ => ‘DESC’, //[ASC] [DESC]

    change for ASC

    Nice plugin for sort post by price range!

    No need to edit the plugin file directly.

    When registering your Query Field just add the sorting into the array:

    register_custom_queryable_field("price", array("dataType"=>"numeric", 'order' => 'ASC',));

    You can only choose between “no sorting” AND ASC OR DESC. Haven’t figured it out jet how to switch between ASC and DESC.

    Regards Stefan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Custom Query Fields] How to sort by ascending order?’ is closed to new replies.