correct logic rfo

This commit is contained in:
argoexpert press
2025-06-18 18:12:37 +03:00
parent 740d2267a3
commit cd0c2b9f97
10 changed files with 269 additions and 35 deletions

View File

@@ -39,7 +39,7 @@ add_filter('single_template', function($template) {
: $category;
// Если рубрика в списке целевых
if (in_array($parent_category->slug, $target_parent_slugs)) {
if (in_array($parent_category->slug, $target_parent_slugs)) {
// Ищем шаблон single-{родительская-рубрика}.php
$new_template = locate_template("single-{$parent_category->slug}.php");
if ($new_template) return $new_template;