- This topic has 1 reply, 2 voices, and was last updated 8 years, 8 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I recently tried using the Post Expirator plugin which worked great. Then I tried using the follow code to sort all posts by ASC order according to the expiry date, . but this just displayed by the order which I had posted them.
But If I made a custom field called start-date and value of YYYY-MM-DD, how would I call the query in the function.php file, to display posts in order that they occur? This is in multiple categories with subcategories.
Example: Event #1 June 01 2014
Event #2 Dec 17 2014
Many thanks to those who can help. Been trying to get this to work for awhile.
Go to http://www.billerickson.net/customize-the-wordpress-query/, scroll down to "Modify Query based on Post Meta" and use that code (modify to your needs).
© 2023 WPEngine, Inc.