diff --git a/category-forest.php b/category-forest.php
new file mode 100644
index 0000000..8c8fd3f
--- /dev/null
+++ b/category-forest.php
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
= get_queried_object()->name ?>
+
+
+
+ 'post',
+ 'post_status' => 'publish',
+ 'paged' => $paged,
+ 'posts_per_page' => get_option('posts_per_page'),
+ 'ignore_sticky_posts' => true,
+ 'no_found_rows' => false // Обязательно для пагинации!
+];
+
+// Обработка родительских/дочерних рубрик
+if (!$current_category->parent) {
+ $child_categories = get_term_children($current_category->term_id, 'category');
+ $args['category__in'] = array_merge([$current_category->term_id], (array)$child_categories);
+} else {
+ $args['cat'] = $current_category->term_id;
+}
+
+$query = new WP_Query($args);
+ ?>
+ $query]); ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/footer-en.php b/footer-en.php
index 5196cbd..ff873cd 100644
--- a/footer-en.php
+++ b/footer-en.php
@@ -9,6 +9,8 @@
endif; ?>