A special single page templates for posts under a category and all its child category
You can do that with single_template filter. First you will need to check if a post belongs to a top level category. So here is the function. // custom single template for specific category function wpse_custom_category_single_template( $single_template ) { global $post; // get all categories of current post $categories = get_the_category( $post->ID ); $top_categories = … Read more