Add the following code to your child theme’s functions.php file to enable the comment form on the bottom of the VegasHero single game posts.


/* Comment support for VegasHero Games */
function vh_add_comment_support() {
add_post_type_support( 'vegashero_games', array( 'comments' ) );
}
add_action('init', 'vh_add_comment_support');
function vh_default_comments_on( $data ) {
if( $data['post_type'] == 'vegashero_games' ) {
$data['comment_status'] = open;
}
return $data;
}
add_filter( 'wp_insert_post_data', 'vh_default_comments_on' );