add landing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user