How to add commentary types or category for a post

An Example. A post for a game. People just comment the game. I wanna
to have 3 types of comments. Comments form team A – comments for Team
B and comments for the referee. This way all the comments are not
mixed up.

The hard way

If I were to undertake such a project, my first instinct would be to define three custom post types. Team A, Team B, and Referee. I would give them only headline and comment. I would also define a post_meta such as “_root_post”.

Then I would hook the new post action and generate one of each for the new post, adding the post_meta key we invented with the post’s ID as the value.

This would give us three threads that can be used. To access them, I would create a child theme and modify the way it handles comments. Instead of the comments for the post itself, I would do a custom query for meta value _root_post == $post_id. Then just lay out three types of comment.

After planning all that, I would think, “man, that is a lot of work. Is there an easier way?” Because, quite frankly, this is a terrible idea.

Somewhat easier way

I would google “comment meta” to find out if that was a thing, discover it is, and think about using add_comment_meta and get_comment_meta.

A further google tells me that the hook comment_form would allow me to add extra form elements to comments. The hook comment_post would allow me to grab my form data and apply a meta value to the comment (A, B, or C).

Now all I have to do is a child theme edit to layout three comment types so they are nice and readable. I could then custom query the comments grouped by my meta value. For layout, I’d probably use JavaScript-powered tabs or something.

Conclusions

I would choose the second and less complex approach unless there is a bringing need to use the first and more complete method. A few custom hooks in your child-themes functions.php and a custom comment template and you are all ready to go.