Created custom class for posts