if in_category on archive.php

If memory serves, in_category() is for use within the loop and returns true when the current post is in that particular category.

You’re probably for is_category(166).