add styles rfo
This commit is contained in:
@@ -10,13 +10,14 @@ add_filter('category_template', function($template) {
|
||||
$parent_category = $current_category->parent
|
||||
? get_category($current_category->parent)
|
||||
: $current_category;
|
||||
|
||||
|
||||
|
||||
// Если текущая или родительская рубрика в списке
|
||||
if (in_array($parent_category->slug, $target_parent_slugs)) {
|
||||
$new_template = locate_template("category-{$parent_category->slug}.php");
|
||||
if ($new_template) return $new_template;
|
||||
}
|
||||
|
||||
|
||||
return $template;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user