Order by three custom fields (Y-m-d), then separate into yearly sections
A single field would be enough but if you manage your way with 3 that’s good as well. I would do a loop through the results and end up with a structure like the following: $years = array( ‘2015’ => array( <WP_Post object>, <WP_Post object>, etc… ), ‘2016’ => array( etc… ) ); Then you … Read more