directive for viewing posts