We're merging with GenerateBlocks! Learn more here.

[Support request] Order Posts By Custom Field

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Order Posts By Custom Field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #11654

    Order Posts By Custom Field kind of works, although things are not in the order they should be.

    wp_show_posts id="63" settings="meta_key=expiry_date&orderby=meta_value&order=ASC

    The 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.


    Hi there,

    You might need to use the function instead of the shortcode so you can create a more complex query.

    For example: https://wordpress.stackexchange.com/questions/59767/order-by-custom-field-date-with-asc-order

    Let me know if you need more info 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.