Don’t worry about the front end output of dates in Advanced Custom Fields, that plugin stores all dates in YYYYMMDD format so it can be used for sorting.
You need the customfield_orderby
shortcode parameter, as per the docs:
customfield_orderby – You can order the posts by a custom field. For example: [catlist numberposts=-1 customfield_orderby=Mood order=desc] will list all the posts with a “Mood” custom field. This parameter can be used toghether with customfield_name and customfield_value, you can use those parameters to select posts and then customfield_orderby to sort by this or another custom field. Remember the default order is descending
So with the above you will have your ordering. What’s left is your 7 day expiry system. This is a bit complicated and cannot be sorted out just with LCP. My suggestions is to use something like [catlist id="3,-4" customfield_orderby="date"]
, this schortcode excludes category with id “4”, now you need custom code or a plugin that will automatically assign this category 7 days after event date and it will disappear from the list. Search for a plugin that can do that, or find someone who can code it for you, it should be easy for anyone who knows something about PHP.
Cheers
-
This reply was modified 6 years, 8 months ago by
zymeth25.
-
This reply was modified 6 years, 8 months ago by
zymeth25.