Sort “List Category Posts” by Custom Field.
Normal use of the plugin “List Category Posts” would be date, or even title, but there is an option to use a custom field.
I created one today, for a site that needed posts ordered by an event date, no matter when they were actually posted
I created a Custom Field named ‘EventDate‘, where the date gets entered as ‘yyyy-mm-dd‘. eg: 2019-03-09
In the “List Category Posts” code for the page, the following was the code used instead of “orderby=date“:
- customfield_orderby=EventDate order=desc
The default order is descending, but I left the “order=desc” in anyway.
35.1 - 538,297