I am building an event calendar and trying to create a filter bu month & year. I have custom post type named "event-calendar" and need to have 5 events per row as i have them in a slider. So need to create the below structure
October 2017
Post 1
Post 2
Post 3
Post 4
Post 5
November 2017
Post 1
Post 2
Post 3
Post 4
Post 5
.............
January 2018
Post 1
Post 2
Post 3
Post 4
Post 5
Tried to do with archives and custom sql query but no luck.