The "sorting" was extremely easy.
I can see that Archives have an "ordering" setting.
Solving the second part of m question is less obvious.
Within the archive I want users to be able to do a custom search for events that fall between two dates.
i.e. Starting on/after a START DATE and ending on/before an END DATE.
BUT I also want to do a preliminary filter to remove any events from the archive list that have expired
i.e. with an END DATE earlier than NOW().
It doesn't seem possible to do that with the Archive filter.
Is there maybe a way of adding some custom code to functions.php that does a preliminary "filter out" of any expired events before putting them into the archive list?
Are you going to add two different filters on the same date field "END DATE":
- Starting on/after a START DATE and ending on/before an END DATE
- with an END DATE earlier than NOW().
If it is, it needs custom codes, Views UI only allow one filter on the same custom field, I suggest you try with Views filter hook "wpv_filter_query" to apply your custom filters: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
When displaying a View listing posts, this filter is applied to the arguments being generated by the View settings before they are passed to the WP_Query class.
"If it is, it needs custom codes, Views UI only allow one filter on the same custom field, I suggest you try with Views filter hook "wpv_filter_query" to apply your custom filters:"
OK. That's what I thought.
I'm more designer than coder.
Any chance you can take a stab at writing the custom function for me?
Since it is a custom codes question, please provide a test site with the same problem, also point out the problem page URL and view URL, I need a live website to test and debug the codes.