Home › Forums › General Issues › Order by true/false field using WP_Query › Reply To: Order by true/false field using WP_Query
Hi @istrasoft
I would need to run some tests to give you the correct information, but off the top of my head, I’m not 100% sure about the WP_Query / Null issue.
If you save a post with a checkbox unticked, it will save the value 0.
I agree that the WP_Query should be able to treat no value as a 0 and order the posts correctly.
Perhaps this will require some googleing / debugging your SQL result (from the WP_Query object) to find out why the SQL is not returning the correct results
Good luck
Cheers
E
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.