Support

Account

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