Change default sorting to a custom attribute

Hi

Is it possible to change the default sorting from post_date to another date created as an attribute? I list music events nearby and want to have ascending order date (rather than post date).

thx

Unfortunately there’s no such feature at the moment, but we have it on the roadmap.

Is there any other option to work around it while you work on that feature?

It’s possible, but this would require code customizations, if you’re familiar with customizations please try using the pre_get_posts WordPress action.

Hi Ihor, I am not familiar unfortunately. Is some sort of snippet required? Any help will be greatly appreciated as in my case it displays events/listings that will take place further in the future ahead of more closer one.

Please check this topic to start Change order of listings to random

But please note that it can require further customization and if you are not familiar with the code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY

Hi Yevhen, I am aware of the random change option. Actually would be great to have a snippet that allows to sort by the chosen attribute - in this case by the event date rather than post date. Post date makes sense for blogs but not really when the other date on your listing item take much greater priority. I am pretty sure that many users will use it. Any chance you could help?

1 Like

Unfortunately, there is no simple solution, it requires advanced customization. But it is possible to use the code snippet from this topic Change order of listings to random to start. If you are not familiar with code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY

Also, we plan to add this feature in future updates