Support

Account

Home Forums General Issues How can the following wp query be sorted by a custom field? Reply To: How can the following wp query be sorted by a custom field?

  • Thank you for the answer! I’m afraid it is still not sorting correctly.. I’m getting elements in this order: 02.La Serena, 00. Santiago, 08.Valdivia, …

    Edit: Changed the value of the select field (Field Type) to only numbers like “00”, “01”, “02”, … and used meta_value_num instead of meta_value
    is not working still.

    Edit2: another option perhaps is to sort after the query? or maybe with a function?