My goal is to display conditional content in an archive page in Wordpress based on whether post belongs to the main category of custom taxonomy and any subcategories of the certain taxonomy category. I know how to achieve this for the plain post categories and child subcategories.
if (is_category('dogs') || cat_is_ancestor_of('dogs', get_query_var( 'cat' )) { echo 'Successs';
The first part works fine
is_tax('advert_category', 380) ) ||
but how do I check whether the post belongs to a subcategory of taxonomy category 380?