Order Posts By Custom Field
-
Trying to order posts by a custom field.
wp_show_posts id="63" settings="meta_key=expiry_date&orderby=meta_value&order=ASCThe output of the custom field (expiry_date) for example is in this format 2019-11-09 00:00:00 (date of expiry, time of expiry).
The posts are not quite showing in the order they should, for instance, there are posts that expire sometime in 2020 showing and they should not be displaying ahead of all 2019 posts. Some months are not in order either, I have October, November, October, December and the some October posts.
The topic ‘Order Posts By Custom Field’ is closed to new replies.