Support

Account

Home Forums ACF PRO Sort post by acf date first and after by title Reply To: Sort post by acf date first and after by title

  • It is not possible to short the posts in the way that you want to sort them. In MySQL empty strings are less than non-empty strings. When sorting in ASC order they will always come first. If you use number as the data type the value would be 0 (zero) again lower than any post with a date.

    There are really 2 choices

    1) ensure that every post has a value

    2) do 2 queries, first get all posts with a value and then get all posts with empty values.