I’m trying to create simple events list from posts and for event date I’m using default publish date, but there is a problem when I need to insert event with the start and end date.
If I use custom field for the end date, I can display date, but I can’t sort them and that’s most important thing on this site. I also need to display the end date in 3 ways: “l, j. m.”, “j. m.” and “D, j. m.”.
Is there any plugin for date range in default posts page (I didn’t find anything) or do you have any idea what to do?
Thanks,
date range within a wp_query is not currently supported out of the box. You could accomplish this with $wpdb and write a select statement using the compare BETWEEN format. That’s a MYSQL question.
There is a good example of BETWEEN date/time ranges here:
MySQL: Compare BETWEEN time
If your date/time is in a standard format you can use strftime to output the time as shown here:
http://strfti.me/