Hi
I have set up Default Sorting to a custom list attribute which is of Date type.
I am setting the value of the custom date on the back end as update_post_meta($listing_id, ‘hp_sort_date’, current_time(‘mysql’));
However on the listing page where that custom Date is selected to be the default sorting I do not see the lists showing as they should, namely it seems that the time is not taken into account.
When i sort the list in the database it shows the listing as it should
SELECT p.*, pm.meta_value AS hp_sort_date FROM wp4z_posts p LEFT JOIN wp4z_postmeta pm ON p.ID = pm.post_id AND pm.meta_key = 'hp_sort_date' WHERE p.post_type = 'hp_listing' ORDER BY pm.meta_value DESC;
Also important, after applying the filter to filter out some listings they show with the default post_date sorting, not the custom one that was set up