Is there a way to change the default post template selection for a specific category?

To set the default template for a specific category of posts in WordPress, you can modify your code to check the categories of the post before setting the default template.

Here is an example of how you can do this:

function default_temp() {
  global $post;
  if ( 'post' == $post->post_type
    && 0 != count( get_page_templates( $post ) )
    && get_option( 'page_for_posts' ) != $post->ID // Not the page for listing posts
    && '' == $post->page_template // Only when page_template is not set
  ) {
    // Get the categories for the post
    $categories = get_the_category( $post->ID );

    // Set the default template for posts in the "8" category
    foreach ( $categories as $category ) {
      if ( '8' == $category->term_id ) {
        $post->page_template = "single-post-game.php";
        break;
      }
    }
  }
}
add_action( 'add_meta_boxes', 'default_temp', 1 );

This will set the default template to “single-post-game.php” for posts in the category with the ID “8”.