Added code to show posts on tab click