# Order Direction Bug for Custom Queries

**URL:** <https://forum.pinegrow.com/t/order-direction-bug-for-custom-queries/7852>\
**Category:** Bug Reports\
**Tags:** wordpress\
**Created:** [March 23, 2023, 5:35am UTC](https://forum.pinegrow.com/t/order-direction-bug-for-custom-queries/7852 "2023-03-23T05:35:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prizonified](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@prizonified](https://forum.pinegrow.com/u/prizonified)\
**Post date:** [March 23, 2023, 5:35am UTC](https://forum.pinegrow.com/t/order-direction-bug-for-custom-queries/7852/1 "2023-03-23T05:35:30Z")

</div>

When creating a custom query. If I set the ‘Order direction’ to Ascending Pinegrow sets the ‘Order’ argument to ‘date’

I had to manually change the order after exporting themes as I had some trouble figuring out why my queries were not working as expected until I previewed the PHP code and played around with the settings.

The same issue does not happen with Descending.

TL:DR - There is a bug that sets ‘order’ =\> ‘date’ instead of ‘ASC’ when you select order direction by Ascending

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [March 26, 2023, 4:48am UTC](https://forum.pinegrow.com/t/order-direction-bug-for-custom-queries/7852/2 "2023-03-26T04:48:34Z")

</div>

@prizonified thanks, this is fixed, will be out in the next release.

There is a simple workaround for now.

In the Order direction enter ‘ASC’ (ASC including single quotes):

 ![orderasc](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/1/1e397d81d0f1527edcceba6cd03fb80e2529313e.jpeg)
