Home Forums Front-end Issues Displaying posts using a custom date field Reply To: Displaying posts using a custom date field

  • If the fields are not part of a repeater or some special field type, for example the date fields are just date pickers, number fields are just numbers, there are no checkboxes or multiselect fields that store data in serialized arrays, then you are just sorting by multiple postmeta fields.

    There was a new feature added to WP in 4.2 that allows you to do this. I don’t know if it’s made it into the documentation. This page explains it.

    And like I said, you need to modify the main query to change the order. This is done using pre_get_posts

    Here is a posts on stack exchange that shows how to use pre_get_posts an order the posts by a single meta value