Add method getPublishedPosts