WordPress second-level classification wants to share a template file with first-level classification, how to write code?

WordPress second-level classification wants to share a template file with first-level classification. How do I write code?

make a judgment in category.php, but it doesn"t seem to work.

<?php

$post = $wp_query->post;

if(in_category("news")) {
    include(TEMPLATEPATH."/category-news.php");
}



else if (in_category("company")){
    include (TEMPLATEPATH."/category-news.php");
}



else {
    include(TEMPLATEPATH."/category-other.php");
}

?>

my company is a second-level category, and now I want to try the template of the first-level classification of category-news.php.

Mar.24,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30d1f-2bd29.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30d1f-2bd29.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?