correct limit archiv
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user