• Resolved Adam Townend

    (@adamtownend)


    Hi,

    I would like to order a list of posts by the nearest expiration date. The post that is set expire next would be first.

    I have attempted to set the orderby part of my query to _expiration-date but it doesn’t seem to give the desired result.

    Is this even possible?

Viewing 1 replies (of 1 total)
  • Plugin Author andergmartins

    (@andergmartins)

    Hi,

    Thanks for using our plugins. The metadata _expiration-date is now working as a backward compatibility layer with 3rd party plugins, but using it in ORDER BY statement should be enough for ordering the list.

    You can also try using the table wp_ppfuture_actions_args. It has a column scheduled_date that stores the expiration date. You just need to make a relation between the post ID and the post_id column on that custom table.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.