Hay, the example on the wp_get_archives documentation page shows how to show a list of all the posts, by months. However if there is no posts for a month, the month doesnt get displayed.
So an example list could look like this
Janauary (5)
March (1)
April (1)
...
Is there a way to force the list to display a month, even if no posts exist?
Thanks
I’ve looked over code and it doesn’t seem possible with this function.
Months and their post counts are fetched with raw SQL query, for months without posts there are simply no records in database. It doesn’t make effort to skip empty month, it simply doesn’t get those from database.