wp_get_archives() display months even if there is no posts

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

Read More
Janauary (5)
March (1)
April (1)
...

Is there a way to force the list to display a month, even if no posts exist?

Thanks

Related posts

Leave a Reply

1 comment

  1. 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.