The code posted in this topic works. I know it works because I tested it before I posted it, and I just tested it again.
Now then. The way WordPress works, for the comments section to be displayed on a post you must enable the Allow people to post comments on new articles option in Settings > Discussion.
As the option says, that enables comments for new articles. It does not enable comments for posts that already exist. That is the way Wordpress works. For existing posts you must edit each of them and enable the Allow comments option in the post’s Discussion metabox. Again that is the way WordPress works. This is not theme functionality, this is the way WordPress works.
If you have a lot of existing posts, for all of which you want comments enabled, there are plugins available that can do that for you with a single click.
NOTE: To include code in your posts such as shortcodes, HTML, CSS, JavaScript, PHP → please follow the instructions on the forum home page.