Added the functionality for displaying posts by year and month