I think that the code that you removed is incomplete. You can see a tutorial about removing a page title in this article. There are also multiple plugins that provide this option. The article also mentions a plugin and links to it.
If you have any further questions or comments, please let us know.
Regards,
Arnel C.