Added functionality to posts page