I've got an "event" custom post type, with a meta field is used for the event date. I've successfully created archive pages (year and month) based on the answer on a previous question (here). Now, I'm trying to create a listing of the archives, sort of like wp_get_archives would work. Example:
The query I'm running to gather up all the dates from the meta_key is this:
$query = $wpdb->get_col( "SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = 'event_date' ORDER BY meta_value DESC" );
But I'm not sure how I can take that data and list it out like the above example. I know I can output the unique dates as is with a foreach loop. That, my output is as follows:
2012-07-15 2011-06-07 2011-01-10
Trying to get it all sorted in the list format, I'm completely unsure of. Any help with this one is greatly appreciated!