I wish to display my posts, not according to the date, but to a completely custom criterion. Ideally, I would manually set a numerical value to each post and the WP loop would display posts according to this value.
So if post X has value 1, post Y has value 2 and Z value 3, it would display first X, then Y, than Z, even though the date criterion would entail a different order. Hope it makes sense.
How to achieve this?
Save the order in a Custom Field, then modify the main query to order on that custom field via
pre_get_posts
. Example for posts page: