Title: [Plugin: Custom Query Fields] Not sorting
Last modified: August 20, 2016

---

# [Plugin: Custom Query Fields] Not sorting

 *  [nvtyson](https://wordpress.org/support/users/nvtyson/)
 * (@nvtyson)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-custom-query-fields-not-sorting/)
 * So I added:
    register_custom_queryable_field(“amzn_LowestNewPrice”, array(“dataType”
   =>”numeric”));
 * to the themes functions.php file – the custom field being:”amzn_LowestNewPrice”
 * When I append the url: [http://lalahotels.com/?cat=3](http://lalahotels.com/?cat=3)**&
   order_by=amzn_LowestNewPrice **
    The sort order changes – but not ASC or DESC.
   Just a random new sort. Did I do something wrong?
 * [http://wordpress.org/extend/plugins/custom-query-fields/](http://wordpress.org/extend/plugins/custom-query-fields/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [JoZu](https://wordpress.org/support/users/jozu/)
 * (@jozu)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-query-fields-not-sorting/#post-2802244)
 * amzn_LowestNewPrice is not a numeric field because you have the price formatted(
   $XXX,XX OR EUR XXX,XX)
    You can create a custom field contain unformatted amazon
   price (XXXXX) and everything work ok.
 *  Thread Starter [nvtyson](https://wordpress.org/support/users/nvtyson/)
 * (@nvtyson)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-query-fields-not-sorting/#post-2802248)
 * Hi JoZu!
 * Thanks so much for the response. Any idea how I can strip the “$” out? The amzn_lowestprice
   custom field is populated by an API – I can map the values over to a new custom
   field, say, “price” but the “$” goes with it. I can’t quite figure out how to
   strip the “$” out.
 * Any suggestions?
 * Thanks!
 * -n

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Custom Query Fields] Not sorting’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-query-fields.svg)
 * [Custom Query Fields](https://wordpress.org/plugins/custom-query-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-query-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-query-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-query-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-query-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-query-fields/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [nvtyson](https://wordpress.org/support/users/nvtyson/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-query-fields-not-sorting/#post-2802248)
 * Status: not resolved