add landing

This commit is contained in:
2025-06-19 16:12:53 +03:00
parent cd0c2b9f97
commit 0c4e403479
13 changed files with 469 additions and 19 deletions

View File

@@ -1,10 +1,17 @@
<?php
add_filter('category_template', function($template) {
$current_category = get_queried_object();
if ( $current_category->slug == 'rfo' ) {
$rfo_template = locate_template('rfo/landing.php');
if ($rfo_template) return $rfo_template;
}
// Только родительские рубрики (их дочерние подрубрики подхватятся автоматически)
$target_parent_slugs = ['forest', 'rfo']; // Только slug родительских рубрик
// Получаем родительскую рубрику
$parent_category = $current_category->parent
@@ -19,6 +26,7 @@ add_filter('category_template', function($template) {
}
return $template;
});
add_filter('single_template', function($template) {