hi i understand you will find many nice functions in wordpress like is_page(), is_single(), is_category();...

do u understand how i can produce a is_subcategory() function?

thanks millions of.

There's not really a is_subcategory() function but you will get the kids (sub category) of the category and employ like a conditional statement.

global $ancestor;
$childcats = get_categories('child_of=' . $cat . '&hide_empty=1');
foreach ($childcats as $childcat) {
  if (cat_is_ancestor_of($ancestor, $childcat->cat_ID) == false){
   //do stuff