diff --git a/functions.php b/functions.php index 47c1797..e60913d 100644 --- a/functions.php +++ b/functions.php @@ -134,7 +134,7 @@ function kuri_set($name = null, $value = null) { if ($name == null) return $vars; - if ($value == null){ + if ($value == null){ if(array_key_exists($name, $vars)) return $vars[$name]; } @@ -625,10 +625,16 @@ add_action( 'pre_get_posts', function ($query) { if ( ! is_admin() && $query->is_main_query() && is_category() ) { // не админка и основной цикл страницы - $query->set( 'posts_per_page', 23 ); - //if ( is_category( 'arkhiv' ) ) { - // $query->set( 'posts_per_page', 19 ); - // } + // $category = get_queried_object(); + // var_dump($category); exit; + + + if ( is_category( 'arkhiv' ) ) { + $query->set( 'posts_per_page', 8 ); + } + else { + $query->set( 'posts_per_page', 23 ); + } }