Added code to get only published content