Showing ads in the specific category and its sub-categories
As described in codex, in_category() checks categories directly assigned to the post. That means that if a post is assigned to a child category but not to the parent, using in_category() with the parent category will fail. Example: you have the category with ID 10, which is child of category 9. The post is assigned … Read more