Add function deletePostById